# load necessary packages and data
library(tidyr)
library(dplyr)
library(readr)
library(plotly)
library(ggplot2)
library(jgcricolors)
library(Polychrome)
setwd("C:/Users/spei632/Documents/GCAM_industry/food_processing")
fig_dir <- "C:/Users/spei632/Documents/GCAM_industry/food_processing/initial_exploration/figures_food_processing_energy_production"
# load data
IEA_en_bal <- read_csv("initial_exploration/data/L100.IEA_en_bal_ctry_hist.csv")
UN_popTot <- read_csv("initial_exploration/data/UN_popTot.csv", skip = 7)
USDA_GDP_MER <- read_csv("initial_exploration/data/USDA_GDP_MER.csv", skip = 6)
WB_ExtraCountries_GDP_MER <- read_csv("initial_exploration/data/WB_ExtraCountries_GDP_MER.csv", skip = 7)
socioeconomics_ctry <- read_csv("initial_exploration/data/socioeconomics_ctry.csv", skip = 7)
macronutrientrate_2010_2019_mean <- read_csv("initial_exploration/data/GCAMDATA_FAOSTAT_MacroNutrientRate_179Regs_426Items_2010to2019Mean.csv")
fao_sua_2010_2019 <- read_csv("initial_exploration/data/GCAMDATA_FAOSTAT_SUA_195Regs_530Items_2010to2019.csv")
fao_fbsh_1973_2009 <- read_csv("initial_exploration/data/GCAMDATA_FAOSTAT_FBSH_CB_173Regs_118Items_1973to2009.csv")
fao_pop <- read_csv("initial_exploration/data/FAOSTAT_data_pop_12-29-2022.csv")
fao_gdp <- read_csv("initial_exploration/data/FAOSTAT_data_gdp_12-29-2022.csv")
# set constants
CONV_KTOE_EJ <- 0.00004186
hist_years <- c(1971:2015)
gcam_hist_years <- c(1990, 2005, 2010, 2015)
conv_P_k <- 10^12
max_frac_INONSPEC <- 0.5
max_frac_INONSPEC_fuel <- 0.8
min_frac_FOODPRO <- 0.01
max_frac_fuel_total_en <- 0.1
# mappings
IEA_product_fuel <- read_csv("mappings/IEA_product_fuel.csv", skip = 7)
enduse_fuel_aggregation <- read_csv("mappings/enduse_fuel_aggregation.csv", skip = 5)
IEA_ctry <- read_csv("mappings/iea_ctry.csv", skip = 5)
iso_GCAM_regID <- read_csv("mappings/iso_GCAM_regID.csv", skip = 6)
GCAM_region_names <- read_csv("mappings/GCAM_region_names.csv", skip = 6)
AGLU_ctry <- read_csv("mappings/AGLU_ctry.csv", skip = 7)
Mapping_SUA_PrimaryEquivalent <- read_csv("initial_exploration/data/Mapping_SUA_PrimaryEquivalent.csv", skip = 21)
Mapping_item_FBS_GCAM <- read_csv("initial_exploration/data/Mapping_item_FBS_GCAM.csv", skip = 7)
GCAM_commodity_type_mapping <- read_csv("mappings/GCAM_commodity_type_mapping.csv")
# colors and palettes
data(palette36)
palette36 <- unname(palette36)
pal_sel <- jgcricol()$pal_all
Calculate GDP per capita from the GDP and population data.
# get just historical populations and GDPs
UN_popTot_hist <- UN_popTot %>%
filter(Year <= 2015 & Scenario == "EST") %>%
mutate(iso = tolower(Country))
GDP_MER_hist <- rbind(USDA_GDP_MER, WB_ExtraCountries_GDP_MER) %>%
pivot_longer(cols = -c(Country, iso), names_to = "year", values_to = "GDP_MER_bil2010USD") %>%
mutate(year = as.numeric(year)) %>%
filter(year <= 2015)
# join and calculate GDP per capita
GDP_per_cap_hist_calc <- GDP_MER_hist %>%
left_join(UN_popTot_hist %>% dplyr::select(year = Year, iso, pop_thousands = Value)) %>%
mutate(GDP_per_cap_thous2015USD = (GDP_MER_bil2010USD*10^6*gcamdata::gdp_deflator(2015, 2010)) / (pop_thousands * 1000))
# get from the FAO data (also include population)
fao_gdp_per_cap_hist <- fao_gdp %>%
filter(Element == "Value US$ per capita, 2015 prices" & Year <= 2015) %>%
left_join(fao_pop %>% mutate(pop = Value * 1000) %>% dplyr::select(Area, Year, pop))
# prep FAO data for joining
fao_gdp_per_cap_hist_relabel <- fao_gdp_per_cap_hist %>%
# exclude USSR values in 1990, because these are covered by individual regions
filter(!(Area == "USSR" & Year == 1990)) %>%
# also exclude the "China" GDP since that includes Hong Kong and Macao as well, which are also broken out; there is another one that is "China, mainland" which we keep
filter(Area != "China") %>%
mutate(GDP_pcap_thous2015USD_FAO = Value / 1000) %>%
dplyr::select(area = Area, year = Year, GDP_pcap_thous2015USD_FAO, pop) %>%
# edit a few areas and join to isos and GCAM region IDs
mutate(area = case_when(area == "Côte d'Ivoire" ~ "Cote dIvoire",
area == "Curaçao" ~ "Curacao",
area == "Democratic People's Republic of Korea" ~ "Democratic Peoples Republic of Korea",
area == "Lao People's Democratic Republic" ~ "Lao Peoples Democratic Republic",
area == "Sint Maarten (Dutch part)" ~ "Sint Maarten (Dutch Part)",
area == "Türkiye" ~ "Turkiye",
grepl("Yemen", area) ~ "Yemen",
TRUE ~ area)) %>%
group_by(area, year) %>%
summarize(GDP_pcap_thous2015USD_FAO = weighted.mean(GDP_pcap_thous2015USD_FAO, pop),
pop = sum(pop)) %>%
ungroup() %>%
left_join(AGLU_ctry %>% select(area = FAO_country, iso), by = "area") %>%
left_join(iso_GCAM_regID %>% select(iso, GCAM_region_ID), by = "iso")
# combine
GDP_per_cap_hist_calc_w_FAO <- GDP_per_cap_hist_calc %>%
dplyr::select(area = Country, iso, year, GDP_pcap_thous2015USD_calc = GDP_per_cap_thous2015USD) %>%
full_join(fao_gdp_per_cap_hist_relabel %>%
rename(area_FAO = area))
First get IEA data for industry (non-specified and specific industries).
# industry flows
flows_sel <- c("MINING", "CONSTRUC", "IRONSTL", "CHEMICAL", "NONFERR", "NONMET", "TRANSEQ", "MACHINE", "FOODPRO", "PAPERPRO", "WOODPRO", "TEXTILES", "INONSPEC")
IEA_ind_sectors_region_fuel <- IEA_en_bal %>%
filter(FLOW %in% flows_sel) %>%
dplyr::select(iso, FLOW, PRODUCT, as.character(hist_years)) %>%
left_join(select(iso_GCAM_regID, iso, GCAM_region_ID, country_name), by = "iso") %>%
left_join(select(IEA_product_fuel, fuel, PRODUCT = product), by = "PRODUCT") %>%
left_join(enduse_fuel_aggregation %>% dplyr::select(fuel, industry)) %>%
# remap biomass_tradbio to biomass
mutate(industry = if_else(fuel == "biomass_tradbio", "biomass", industry)) %>%
pivot_longer(as.character(hist_years), names_to = "year", values_to = "value") %>%
rename(fuel_orig = fuel, fuel = industry) %>%
filter(!is.na(fuel)) %>%
group_by(iso, country_name, GCAM_region_ID, year, fuel, FLOW) %>%
# summarize and convert to EJ
summarize(value = sum(value, na.rm = TRUE) * CONV_KTOE_EJ) %>%
ungroup() %>%
mutate(year = as.numeric(year)) %>%
group_by(iso, country_name, GCAM_region_ID, year, fuel) %>%
mutate(frac_sector = value / sum(value)) %>%
ungroup()
# complete nesting so that there are values for all sectors, fuels, and years, even if 0
all_IEA_years <- unique(IEA_ind_sectors_region_fuel$year)
all_IEA_fuels <- unique(IEA_ind_sectors_region_fuel$fuel)
IEA_ind_sectors_region_fuel <- IEA_ind_sectors_region_fuel %>%
complete(nesting(iso, country_name, GCAM_region_ID),
year = all_IEA_years,
FLOW = flows_sel,
fuel = all_IEA_fuels) %>%
mutate(value = replace_na(value, 0),
frac_sector = replace_na(frac_sector, 0))
# aggregate to GCAM region level
IEA_ind_sectors_GCAM_region_fuel <- IEA_ind_sectors_region_fuel %>%
group_by(GCAM_region_ID, year, fuel, FLOW) %>%
summarize(value = sum(value)) %>%
ungroup() %>%
full_join(GCAM_region_names) %>%
group_by(GCAM_region_ID, year, fuel) %>%
mutate(frac_sector = value / sum(value)) %>%
ungroup()
# plot the fraction of each fuel used in each sector in each region
for (fuel_sel in unique(IEA_ind_sectors_region_fuel$fuel)) {
ggplot(IEA_ind_sectors_region_fuel %>% filter(fuel == fuel_sel),
aes(x = year, y = value, fill = FLOW)) +
geom_col() +
scale_fill_manual(values = c("gray20", "red", "firebrick4", "deepskyblue1", "dodgerblue3",
"olivedrab", "darkgreen", "palegreen", "peachpuff2", "pink", "mediumpurple",
"gold1", "orange"), name = "sector") +
facet_wrap(~country_name, scale = "free") +
labs(x = "", y = "EJ", title = paste0("Industry ", fuel_sel, " use by sector(IEA)")) +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/ind_", fuel_sel, "_use_by_sector_country_hist_IEA.png"), width = 35, height = 20)
}
# get the regions and fuels with all their energy in INONSPEC in all years
country_fuels_all_inonspec <- IEA_ind_sectors_region_fuel %>%
filter(FLOW == "INONSPEC") %>%
group_by(iso, country_name, GCAM_region_ID, fuel) %>%
filter(all(frac_sector == 1)) %>%
dplyr::select(iso, country_name, GCAM_region_ID, fuel) %>%
distinct()
# aggregate to total energy
IEA_ind_sectors_region_total_en <- IEA_ind_sectors_region_fuel %>%
group_by(iso, country_name, GCAM_region_ID, year, FLOW) %>%
summarize(value = sum(value)) %>%
group_by(iso, country_name, GCAM_region_ID, year) %>%
mutate(frac = value / sum(value)) %>%
ungroup()
# aggregate to GCAM region
IEA_ind_sectors_GCAM_region_total_en <- IEA_ind_sectors_region_total_en %>%
group_by(GCAM_region_ID, year, FLOW) %>%
summarize(value = sum(value)) %>%
group_by(GCAM_region_ID, year) %>%
mutate(frac = value / sum(value)) %>%
ungroup()
Look at the fraction of energy that is in non-specified industry energy and food processing in each region.
ggplot(IEA_ind_sectors_region_total_en,
aes(x = year, y = value, color = FLOW)) +
geom_line() +
scale_color_manual(values = c("gray20", "red", "firebrick4", "deepskyblue1", "dodgerblue3",
"olivedrab", "darkgreen", "palegreen", "peachpuff2", "pink", "mediumpurple",
"gold1", "orange"), name = "sector") +
facet_wrap(~country_name, scale = "free") +
labs(x = "", y = "EJ", title = "Industry energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/ind_energy_use_by_sector_country_hist_IEA.png"), width = 35, height = 20)
# plot the fraction of total industry energy that is in non-specified industry
plot_ly(IEA_ind_sectors_region_total_en %>%
filter(FLOW == "INONSPEC")) %>%
add_trace(x = ~year,
y = ~frac,
type = "scatter",
mode = "lines",
color = ~country_name) %>%
layout(xaxis = list(title = ""),
yaxis = list(title = "Fraction"),
title = "Fraction of industry energy that is in non-specified industry energy")
# plot fractions in food processing and non-specified industry
ggplot(IEA_ind_sectors_region_total_en %>% filter(FLOW %in% c("INONSPEC", "FOODPRO")),
aes(x = year, y = frac, color = FLOW)) +
geom_line() +
geom_hline(yintercept = 0.5, linetype = "dashed", color = "slategray") +
scale_color_manual(values = c("firebrick4", "deepskyblue1"), name = "sector") +
facet_wrap(~country_name, scale = "free_x") +
labs(x = "", y = "Fraction", title = "Fraction of total industry energy use in non-specified industry and food processing (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/ind_energy_use_frac_inonspec_foodpro_country_hist_IEA.png"), width = 35, height = 20)
# exclude regions with more than 90% industry non-specified in all periods
country_names_excl_1 <- IEA_ind_sectors_region_total_en %>%
filter(FLOW == "INONSPEC") %>%
group_by(iso, country_name, GCAM_region_ID) %>%
filter(all(frac > 0.9 | is.na(frac))) %>%
arrange(country_name) %>%
pull(country_name) %>%
unique()
ggplot(IEA_ind_sectors_region_total_en %>%
filter(FLOW %in% c("INONSPEC", "FOODPRO") & !country_name %in% country_names_excl_1),
aes(x = year, y = frac, color = FLOW)) +
geom_line() +
scale_color_manual(values = c("firebrick4", "deepskyblue1"), name = "sector") +
facet_wrap(~country_name, scale = "free_x") +
labs(x = "", y = "Fraction", title = "Fraction of total industry energy use in non-specified industry and food processing (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/ind_energy_use_frac_inonspec_foodpro_country_hist_IEA_sel_1.png"), width = 35, height = 20)
# exclude regions with no energy used in food processing in all periods
country_names_excl_zero_foodpro <- IEA_ind_sectors_region_total_en %>%
filter(FLOW == "FOODPRO") %>%
group_by(iso, country_name, GCAM_region_ID) %>%
filter(all(value == 0)) %>%
arrange(country_name) %>%
pull(country_name) %>%
unique()
ggplot(IEA_ind_sectors_region_total_en %>%
filter(FLOW %in% c("INONSPEC", "FOODPRO") & !country_name %in% country_names_excl_zero_foodpro),
aes(x = year, y = frac, color = FLOW)) +
geom_line() +
scale_color_manual(values = c("firebrick4", "deepskyblue1"), name = "sector") +
facet_wrap(~country_name, scale = "free_x") +
labs(x = "", y = "Fraction", title = "Fraction of total industry energy use in non-specified industry and food processing (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/ind_energy_use_frac_inonspec_foodpro_country_hist_IEA_sel_nonzero_foodpro_all.png"), width = 35, height = 20)
# plot energy used in food processing by fuel
ggplot(IEA_ind_sectors_region_fuel %>% filter(FLOW == "FOODPRO"),
aes(x = year, y = value, fill = fuel)) +
geom_col() +
facet_wrap(~country_name, scale = "free") +
scale_fill_manual(values = pal_sel, drop = TRUE, limits = force) +
labs(x = "", y = "EJ", title = "Food processing energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_by_country_fuel_hist_IEA.png"), width = 35, height = 20)
Obtain food processing energy use per capita and plot for all regions that have nonzero values for food processing in at least some years.
IEA_ind_sectors_region_total_en_pcap <- IEA_ind_sectors_region_total_en %>%
left_join(UN_popTot_hist %>%
dplyr::select(year = Year, pop_thous = Value, iso)) %>%
mutate(GJ_pcap = value * 10^9 / (pop_thous * 1000))
ggplot(IEA_ind_sectors_region_total_en_pcap %>%
filter(FLOW %in% c("FOODPRO") & !country_name %in% country_names_excl_zero_foodpro),
aes(x = year, y = GJ_pcap, color = FLOW)) +
geom_line() +
scale_color_manual(values = c("firebrick4", "deepskyblue1"), name = "sector") +
facet_wrap(~country_name, scale = "free_x") +
labs(x = "", y = "GJ per capita", title = "Per capita energy use in food processing (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_pcap_country_hist_IEA_sel_nonzero_all.png"), width = 25, height = 20)
# plot also not per capita
ggplot(IEA_ind_sectors_region_total_en_pcap %>%
filter(FLOW %in% c("FOODPRO") & !country_name %in% country_names_excl_zero_foodpro),
aes(x = year, y = value, color = FLOW)) +
geom_line() +
scale_color_manual(values = c("firebrick4", "deepskyblue1"), name = "sector") +
facet_wrap(~country_name, scale = "free") +
labs(x = "", y = "EJ", title = "Energy use in food processing (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_country_hist_IEA_sel_nonzero_all.png"), width = 25, height = 20)
plot_ly(IEA_ind_sectors_region_total_en_pcap %>%
filter(FLOW %in% c("FOODPRO") & !country_name %in% country_names_excl_zero_foodpro)) %>%
add_trace(x = ~year,
y = ~GJ_pcap,
type = "scatter",
mode = "lines",
color = ~country_name) %>%
layout(xaxis = list(title = ""),
yaxis = list(title = "GJ per capita"),
title = "Food processing energy use per capita for regions where it is not zero in all periods, IEA data")
Get food production.
# from Xin's updated AGLU branch - processing into GCAM commodities and calories
# 2010-2019 data first
fao_sua_2010_2019_longer <- fao_sua_2010_2019 %>%
pivot_longer(-c(area_code, item_code, element, item, area), names_to = "year", values_to = "value") %>%
filter(!is.na(value))
Mapping_SUA_PrimaryEquivalent %>%
select(GCAM_commodity, item = source_item) %>%
bind_rows(Mapping_SUA_PrimaryEquivalent %>%
select(GCAM_commodity, item = sink_item)) %>%
distinct() %>% arrange(GCAM_commodity) ->
SUA_Items_GCAM
fao_sua_2010_2019_longer %>% distinct(item) %>%
filter(!item %in% unique(SUA_Items_GCAM$item)) -> SUA_Items_NonGCAM
fao_sua_2010_2019_longer %>% distinct(item, item_code) %>%
filter(item %in% unique(macronutrientrate_2010_2019_mean$item)) %>%
left_join(SUA_Items_GCAM, by = "item") %>%
# For NA GCAM_commodity: not elsewhere classified (NEC)
# So we would know % of food calories not included in GCAM commodities
mutate(GCAM_commodity = if_else(is.na(GCAM_commodity), "NEC", GCAM_commodity)) ->
SUA_Items_Food
# get world average macronutrient rate
macronutrientrate_2010_2019_mean %>% tidyr::gather(macronutrient, macronutrient_value, calperg:proteinperc) %>%
group_by(item, item_code, macronutrient) %>%
summarise(macronutrient_value_World = mean(macronutrient_value), .groups = "drop") %>%
ungroup() ->
SUA_food_macronutrient_rate_World
# calculate SUA food Calories consumption by joining macronutrient rates and SUA food - adapted from Xin's code, not using world average for regions with missing data
fao_sua_2010_2019_longer %>%
filter(element == "Food", item_code %in% SUA_Items_Food$item_code) %>%
rename(Food_Kt = value) %>%
select(-element) %>%
gcamdata::left_join_error_no_match(SUA_Items_Food, by = c("item_code", "item")) %>%
gcamdata::repeat_add_columns(
tibble(macronutrient = c("calperg", "fatperc", "proteinperc"))) %>%
left_join(macronutrientrate_2010_2019_mean %>%
tidyr::gather(macronutrient, macronutrient_value, calperg:proteinperc),
by = c("area_code", "item_code", "item", "macronutrient")) %>%
# gcamdata::left_join_error_no_match(SUA_food_macronutrient_rate_World,
# by = c("item_code", "item", "macronutrient")) %>%
# mutate(macronutrient_value = if_else(is.na(macronutrient_value),
# macronutrient_value_World,
# macronutrient_value)) %>%
# calculate total Cal, protein and fat in food
# value was in 1000 ton or 10^ 9 g
mutate(value = macronutrient_value * Food_Kt,
value = if_else(macronutrient %in% c("fatperc", "proteinperc"),
value / 100 /1000, value)) %>% # unit from perc to Mt
#select(-macronutrient_value, -macronutrient_value_World, -Food_Kt) %>%
select(-macronutrient_value) %>%
# rename element with units
mutate(macronutrient = case_when(
macronutrient == "calperg" ~ "MKcal",
macronutrient == "fatperc" ~ "MtFat",
macronutrient == "proteinperc" ~ "MtProtein" )) %>%
gcamdata::left_join_error_no_match(AGLU_ctry %>% select(area = FAO_country, iso), by = "area") %>%
gcamdata::left_join_error_no_match(iso_GCAM_regID %>% select(iso, GCAM_region_ID), by = "iso") ->
FAO_Food_Macronutrient_All_2010_2019
# calculate macronutrient rates from the aggregated values - aggregated to GCAM commodities
macronutrientrate_agg_GCAM_commod_2010_2019 <- FAO_Food_Macronutrient_All_2010_2019 %>%
pivot_wider(names_from = macronutrient, values_from = value) %>%
# in this calculation, we only want to include food that has an associated calorie content (to not have too high of a denominator)
mutate(Food_Kt_w_calorie = if_else(is.na(MKcal), 0, Food_Kt)) %>%
group_by(area_code, area, year, GCAM_commodity, iso, GCAM_region_ID) %>%
summarize(Food_Kt = sum(Food_Kt_w_calorie),
MKcal = sum(MKcal, na.rm = TRUE),
MtFat = sum(MtFat, na.rm = TRUE),
MtProtein = sum(MtProtein, na.rm = TRUE)) %>%
mutate(calperg = MKcal / Food_Kt,
fatperc = MtFat / Food_Kt * 100 * 1000,
proteinperc = MtProtein / Food_Kt * 100 * 1000)
# aggregate to mean of all years
macronutrientrate_agg_GCAM_commod_2010_2019_mean <- macronutrientrate_agg_GCAM_commod_2010_2019 %>%
group_by(area_code, area, GCAM_commodity, iso, GCAM_region_ID) %>%
summarize(Food_Kt_sum = sum(Food_Kt),
MKcal_sum = sum(MKcal),
MtFat_sum = sum(MtFat),
MtProtein_sum = sum(MtProtein),
calperg_mean = mean(calperg, na.rm = TRUE),
fatperc = mean(fatperc, na.rm = TRUE),
proteinperc = mean(proteinperc, na.rm = TRUE),
calperg_mean_weighted = MKcal_sum / Food_Kt_sum) %>%
ungroup()
# aggregate to total calories
FAO_Food_Macronutrient_All_2010_2019_total <- FAO_Food_Macronutrient_All_2010_2019 %>%
# get Food_Kt both including and not including food that has no associated calorie content
mutate(Food_Kt_w_macronutrient = if_else(is.na(value), 0, Food_Kt)) %>%
group_by(area, year, iso, GCAM_region_ID, macronutrient) %>%
summarize(macronutrient_value = sum(value, na.rm = TRUE),
Food_Kt = sum(Food_Kt),
Food_Kt_w_macronutrient = sum(Food_Kt_w_macronutrient)) %>%
ungroup() %>%
mutate(year = as.numeric(year))
# aggregate to staples, meat, and other non-staples
FAO_Food_Macronutrient_All_2010_2019_total_cats <- FAO_Food_Macronutrient_All_2010_2019 %>%
left_join(GCAM_commodity_type_mapping %>% dplyr::select(GCAM_commodity, commodity_type_broad)) %>%
# get Food_Kt both including and not including food that has no associated calorie content
mutate(Food_Kt_w_macronutrient = if_else(is.na(value), 0, Food_Kt)) %>%
group_by(area, year, iso, GCAM_region_ID, commodity_type_broad, macronutrient) %>%
summarize(macronutrient_value = sum(value, na.rm = TRUE),
Food_Kt = sum(Food_Kt),
Food_Kt_w_macronutrient = sum(Food_Kt_w_macronutrient)) %>%
ungroup() %>%
mutate(year = as.numeric(year))
# aggregate by GCAM commodity
FAO_Food_Macronutrient_All_2010_2019_commodity <- FAO_Food_Macronutrient_All_2010_2019 %>%
# get Food_Kt both including and not including food that has no associated calorie content
mutate(Food_Kt_w_macronutrient = if_else(is.na(value), 0, Food_Kt)) %>%
group_by(area, year, iso, GCAM_region_ID, GCAM_commodity, macronutrient) %>%
summarize(macronutrient_value = sum(value, na.rm = TRUE),
Food_Kt = sum(Food_Kt),
Food_Kt_w_macronutrient = sum(Food_Kt_w_macronutrient)) %>%
ungroup() %>%
mutate(year = as.numeric(year))
# data before 2010
fao_fbsh_1973_2009 %>%
gcamdata::gather_years() %>%
filter(year < min(fao_sua_2010_2019_longer$year)) %>%
filter(!is.na(value)) ->
FBSH_CB
Mapping_item_FBS_GCAM %>%
select(item_code, GCAM_commodity)%>%
filter(!is.na(GCAM_commodity)) %>%
left_join(FBSH_CB %>%
# complete element
complete(nesting(area, area_code, item_code, item, year), element,
fill = list(value = 0)),
by = "item_code") %>%
dplyr::group_by_at(vars(-value, -item, -item_code)) %>%
summarise(value = sum(value), .groups = "drop") %>%
gcamdata::left_join_error_no_match(AGLU_ctry %>% select(area = FAO_country, iso), by = "area") %>%
gcamdata::left_join_error_no_match(iso_GCAM_regID %>% select(iso, GCAM_region_ID), by = "iso") %>%
gcamdata::left_join_error_no_match(GCAM_region_names, by = "GCAM_region_ID") %>%
#dplyr::group_by_at(vars(area = region, year, GCAM_commodity, element)) %>%
dplyr::group_by_at(vars(area, region, GCAM_region_ID, year, GCAM_commodity, element, iso, unit)) %>%
summarise(value = sum(value), .groups = "drop") ->
FBSH_CB_reg
# get just food
FBSH_CB_reg_food <- FBSH_CB_reg %>%
filter(element == "Food" & !is.na(unit)) %>%
mutate(unit = "Kt")
# convert to calories using the (weighted) mean of the conversion rate from the 2010-2019 data
FBSH_CB_reg_food_cal <- FBSH_CB_reg_food %>%
left_join(macronutrientrate_agg_GCAM_commod_2010_2019_mean %>%
dplyr::select(area, iso, GCAM_region_ID, GCAM_commodity, calperg = calperg_mean_weighted),
by = c("area", "GCAM_region_ID", "iso", "GCAM_commodity")) %>%
mutate(MKcal = value * calperg)
# some regions have no data for food production for some crops in the 2010-2019 data but have a mean conversion rate for the individual commodities -- take the average of the commodities that constitute the overall GCAM commodity (assuming they contribute equally to the total production of the overall GCAM commodity - big assumption but not sure how else to do it)
# Actually not going to use this for now...they are far off from the real rates
macronutrientrate_2010_2019_mean_by_GCAM_commodity <- macronutrientrate_2010_2019_mean %>%
left_join(SUA_Items_Food) %>%
group_by(area_code, GCAM_commodity) %>%
summarize(calperg_mean = mean(calperg))
# aggregate to total calories
FBSH_CB_reg_food_cal_total <- FBSH_CB_reg_food_cal %>%
# get Food_Kt both including and not including food that has no associated calorie content
mutate(Food_Kt_w_calorie = if_else(is.na(MKcal), 0, value)) %>%
group_by(area, year, iso, GCAM_region_ID, region) %>%
summarize(MKcal = sum(MKcal, na.rm = TRUE),
Food_Kt = sum(value),
Food_Kt_w_calorie = sum(Food_Kt_w_calorie)) %>%
ungroup()
# aggregate to staples, meat, and other non-staples
FBSH_CB_reg_food_cal_total_cats <- FBSH_CB_reg_food_cal %>%
left_join(GCAM_commodity_type_mapping %>% dplyr::select(GCAM_commodity, commodity_type_broad)) %>%
# get Food_Kt both including and not including food that has no associated calorie content
mutate(Food_Kt_w_calorie = if_else(is.na(MKcal), 0, value)) %>%
group_by(area, year, iso, GCAM_region_ID, region, commodity_type_broad) %>%
summarize(MKcal = sum(MKcal, na.rm = TRUE),
Food_Kt = sum(value),
Food_Kt_w_calorie = sum(Food_Kt_w_calorie)) %>%
ungroup()
# combine the pre-2010 and 2010-2019 data
total_cal_food_kt_all_years <- FAO_Food_Macronutrient_All_2010_2019_total %>%
pivot_wider(names_from = macronutrient, values_from = macronutrient_value) %>%
dplyr::select(area, year, iso, GCAM_region_ID, Food_Kt, Food_Kt_w_calorie = Food_Kt_w_macronutrient, MKcal) %>%
rbind(FBSH_CB_reg_food_cal_total %>%
dplyr::select(area, year, iso, GCAM_region_ID, MKcal, Food_Kt, Food_Kt_w_calorie)) %>%
mutate(frac_Food_Kt_w_calorie = Food_Kt_w_calorie / Food_Kt,
calperg_food_w_calorie = MKcal / Food_Kt_w_calorie) %>%
arrange(area, year)
total_cal_food_kt_all_years_cats <- FAO_Food_Macronutrient_All_2010_2019_total_cats %>%
pivot_wider(names_from = macronutrient, values_from = macronutrient_value) %>%
dplyr::select(area, year, iso, GCAM_region_ID, Food_Kt, Food_Kt_w_calorie = Food_Kt_w_macronutrient, MKcal, commodity_type_broad) %>%
rbind(FBSH_CB_reg_food_cal_total_cats %>%
dplyr::select(area, year, iso, GCAM_region_ID, MKcal, Food_Kt, Food_Kt_w_calorie, commodity_type_broad)) %>%
mutate(frac_Food_Kt_w_calorie = Food_Kt_w_calorie / Food_Kt,
calperg_food_w_calorie = MKcal / Food_Kt_w_calorie) %>%
arrange(area, year, commodity_type_broad)
# combine the GCAM-commodity level data
total_cal_food_kt_all_years_commodity <- FAO_Food_Macronutrient_All_2010_2019_commodity %>%
pivot_wider(names_from = macronutrient, values_from = macronutrient_value) %>%
dplyr::select(area, year, iso, GCAM_region_ID, Food_Kt, Food_Kt_w_calorie = Food_Kt_w_macronutrient, MKcal, GCAM_commodity) %>%
rbind(FBSH_CB_reg_food_cal %>%
# get Food_Kt both including and not including food that has no associated calorie content
mutate(Food_Kt_w_calorie = if_else(is.na(MKcal), 0, value)) %>%
dplyr::select(area, year, iso, GCAM_region_ID, MKcal, Food_Kt = value, Food_Kt_w_calorie, GCAM_commodity)) %>%
mutate(frac_Food_Kt_w_calorie = Food_Kt_w_calorie / Food_Kt,
calperg_food_w_calorie = MKcal / Food_Kt_w_calorie) %>%
arrange(area, year, GCAM_commodity)
# alternate options
# also obtain animal feed in production units
fao_sua_2010_2019_longer %>%
filter(element == "Feed", item_code %in% SUA_Items_Food$item_code) %>%
rename(Feed_Kt = value) %>%
select(-element) %>%
gcamdata::left_join_error_no_match(SUA_Items_Food, by = c("item_code", "item")) %>%
gcamdata::left_join_error_no_match(AGLU_ctry %>% select(area = FAO_country, iso), by = "area") %>%
gcamdata::left_join_error_no_match(iso_GCAM_regID %>% select(iso, GCAM_region_ID), by = "iso") ->
FAO_Feed_Production_All_2010_2019
# aggregate to total feed production by region
total_feed_kt_2010_2019 <- FAO_Feed_Production_All_2010_2019 %>%
group_by(area_code, area, year, iso, GCAM_region_ID) %>%
summarize(Feed_Kt = sum(Feed_Kt)) %>%
mutate(year = as.numeric(year)) %>%
ungroup()
# get pre-2010 data
FBSH_CB_reg_feed <- FBSH_CB_reg %>%
filter(element == "Feed" & !is.na(unit)) %>%
mutate(unit = "Kt")
total_feed_kt_till_2010 <- FBSH_CB_reg_feed %>%
group_by(area, year, iso, GCAM_region_ID) %>%
summarize(Feed_Kt = sum(value)) %>%
ungroup()
# join
total_feed_kt_all_years <- total_feed_kt_2010_2019 %>%
dplyr::select(area, year, iso, GCAM_region_ID, Feed_Kt) %>%
rbind(total_feed_kt_till_2010 %>%
dplyr::select(area, year, iso, GCAM_region_ID, Feed_Kt)) %>%
arrange(area, year)
Plot calorie production by region, and the fraction of food produced that has a corresponding calorie content.
ggplot(total_cal_food_kt_all_years,
aes(x = year, y = MKcal)) +
geom_line() +
facet_wrap(~area, scale = "free") +
labs(x = "", y = "MKcal", title = "Total food production in calories (calculated from FAO data)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1980, 1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/food_prod_by_country_FAO.png"), width = 30, height = 20)
ggplot(total_cal_food_kt_all_years,
aes(x = year, y = Food_Kt, color = "darkred")) +
geom_line() +
facet_wrap(~area, scale = "free") +
labs(x = "", y = "Kt", title = "Total food production in tonnes (from FAO data)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1980, 1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/food_prod_by_country_Kt_FAO.png"), width = 30, height = 20)
ggplot(total_cal_food_kt_all_years_cats,
aes(x= year, y = MKcal, fill = commodity_type_broad)) +
geom_col() +
facet_wrap(~area, scale = "free_y") +
scale_fill_manual(values = c("darkred", "darkgreen", "darkblue"), name = "") +
labs(x = "", y = "MKcal", title = "Total food production in calories by type (calculated from FAO data)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1980, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/food_prod_by_type_country_FAO.png"), width = 35, height = 20)
ggplot(total_cal_food_kt_all_years,
aes(x = year, y = frac_Food_Kt_w_calorie)) +
geom_line() +
facet_wrap(~area, scale = "free") +
labs(x = "", y = "Fraction", title = "Fraction of food production that has an associated calorie content (calculated from FAO data)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1980, 1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/food_prod_frac_w_cal_content_by_country_FAO.png"), width = 30, height = 20)
plot_ly(total_cal_food_kt_all_years) %>%
add_trace(x = ~year,
y = ~MKcal,
type = "scatter",
mode = "lines",
color = ~area) %>%
layout(xaxis = list(title = ""),
yaxis = list(title = "MKcal"),
title = "Total food production in calories (calculated from FAO data)")
plot_ly(total_cal_food_kt_all_years) %>%
add_trace(x = ~year,
y = ~Food_Kt,
type = "scatter",
mode = "lines",
color = ~area) %>%
layout(xaxis = list(title = ""),
yaxis = list(title = "Kt"),
title = "Total food production in tonnes (from FAO data)")
plot_ly(total_cal_food_kt_all_years) %>%
add_trace(x = ~year,
y = ~frac_Food_Kt_w_calorie,
type = "scatter",
mode = "lines",
color = ~area) %>%
layout(xaxis = list(title = ""),
yaxis = list(title = "Fraction"),
title = "Fraction of food production that has an associated calorie content (calculated from FAO data)")
plot_ly(total_cal_food_kt_all_years) %>%
add_trace(x = ~year,
y = ~calperg_food_w_calorie,
type = "scatter",
mode = "lines",
color = ~area) %>%
layout(xaxis = list(title = ""),
yaxis = list(title = "cal per g"),
title = "Overall calories per g food produced (calculated from FAO data)")
To start, will try a few options for selecting valid regions and years. On the energy side:
Calculating the relationship for all regions and years where food processing energy use is nonzero.
Calculating the relationship for all regions and years where food processing energy use is nonzero, and no fuels are fully allocated to non-specified industry (because if this is true, that means that there is not a detailed breakdown of sectoral use of those fuels, meaning it is likely that some should be allocated to food processing).
Calculating the relationship for all regions and years where food processing energy is nonzero, and the fraction of total industry energy used in food processing is greater than 0.01 and where the fraction of total energy use that is in non-specified industry is less than 0.5.
Calculating the relationship for all regions and years where food processing energy is nonzero, and the fraction of total industry energy used in food processing is greater than 0.01 and where the fraction of total energy use that is in non-specified industry FOR EACH FUEL FUEL is less than 0.8.
On the food production data side: (always only using regions that do not have zero food production in all years)
First using only 2010-2019 (really only till 2015 for compatibility with IEA data), years for which the data are better.
Using 1973-2019 (2015) (all regions and years have over 99% of the food production in tonnes has a corresponding calorie content)
Will try both using total calories and breaking out staples, animal products, and non-meat non-staples.
# first join the food processing energy use data with the food production data
IEA_foodpro_region_total_en <- IEA_ind_sectors_region_total_en %>%
filter(FLOW == "FOODPRO")
comb_data_all <- IEA_foodpro_region_total_en %>%
dplyr::select(iso, country_name, GCAM_region_ID, year, energy = value) %>%
full_join(total_cal_food_kt_all_years %>%
dplyr::select(iso, year, GCAM_region_ID, Food_Kt, Food_Kt_w_calorie, MKcal, calperg_food_w_calorie)) %>%
full_join(GDP_per_cap_hist_calc_w_FAO %>%
dplyr::select(iso, year, GCAM_region_ID, GDP_pcap_thous2015USD_calc, GDP_pcap_thous2015USD_FAO, pop)) %>%
left_join(total_feed_kt_all_years %>%
dplyr::select(iso, year, GCAM_region_ID, Feed_Kt)) %>%
filter(year %in% all_IEA_years & !is.na(energy)) %>%
arrange(country_name, year) %>%
# convert some units
mutate(PKcal = MKcal / (10^9))
# select just regions that do not have zero food processing energy use in all years, and also do not have no food production in all years
comb_data_sel <- comb_data_all %>%
group_by(iso) %>%
filter(!all(energy == 0) & !all(is.na(MKcal) | MKcal == 0)) %>%
ungroup()
# repeat for the food data with category of food -- add the food production by category and commodity to the rest of the data
comb_data_all_cats <- comb_data_all %>%
left_join(total_cal_food_kt_all_years_cats %>%
# convert some units
mutate(PKcal = MKcal / (10^9)) %>%
dplyr::select(iso, year, GCAM_region_ID, commodity_type_broad, PKcal) %>%
pivot_wider(names_from = commodity_type_broad, values_from = PKcal)) %>%
mutate(staples_frac = staples / PKcal,
nonstaples_frac = (nonstaples_animal + nonstaples_other) / PKcal,
EJ_per_PKcal = energy / PKcal,
EJ_pcap = energy / pop) %>%
left_join(total_cal_food_kt_all_years_commodity %>%
# convert some units
mutate(PKcal = MKcal / (10^9)) %>%
dplyr::select(iso, year, GCAM_region_ID, GCAM_commodity, PKcal) %>%
pivot_wider(names_from = GCAM_commodity, values_from = PKcal))
# select just regions that do not have zero food processing energy use in all years, and also do not have no food production in all years
comb_data_sel_cats <- comb_data_all_cats %>%
group_by(iso) %>%
filter(!all(energy == 0) & !all(is.na(MKcal) | MKcal == 0)) %>%
ungroup()
# function to calculate the relationship between food processing energy use and food production, GDP per capita, and other variables
calc_lin_model_food_en_use_production <- function(input_data, sel_name) {
lin_reg_1 <- lm(energy ~ PKcal, input_data)
lin_reg_summary_1 <- summary(lin_reg_1)
print(lin_reg_summary_1)
lin_reg_1a <- lm(energy ~ 0 + PKcal, input_data)
lin_reg_summary_1a <- summary(lin_reg_1a)
print(lin_reg_summary_1a)
lin_reg_2 <- lm(energy ~ PKcal + calperg_food_w_calorie, input_data)
lin_reg_summary_2 <- summary(lin_reg_2)
print(lin_reg_summary_2)
lin_reg_3 <- lm(energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO, input_data)
lin_reg_summary_3 <- summary(lin_reg_3)
print(lin_reg_summary_3)
lin_reg_3b <- lm(energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO), input_data)
lin_reg_summary_3b <- summary(lin_reg_3b)
print(lin_reg_summary_3b)
lin_reg_4 <- lm(energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc, input_data)
lin_reg_summary_4 <- summary(lin_reg_4)
print(lin_reg_summary_4)
lin_reg_5 <- lm(energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO), input_data)
lin_reg_summary_5 <- summary(lin_reg_5)
print(lin_reg_summary_5)
lin_reg_6 <- lm(energy ~ PKcal + PKcal:calperg_food_w_calorie + PKcal:log(GDP_pcap_thous2015USD_FAO), input_data)
lin_reg_summary_6 <- summary(lin_reg_6)
print(lin_reg_summary_6)
confint(lin_reg_6)
lin_reg_7 <- lm(energy ~ PKcal + PKcal*calperg_food_w_calorie + PKcal*log(GDP_pcap_thous2015USD_FAO), input_data)
lin_reg_summary_7 <- summary(lin_reg_7)
print(lin_reg_summary_7)
print(confint(lin_reg_7))
lin_reg_8 <- lm(energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_8 <- summary(lin_reg_8)
print(lin_reg_summary_8)
print(confint(lin_reg_8))
lin_reg_9 <- lm(energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year + country_name, input_data)
lin_reg_summary_9 <- summary(lin_reg_9)
print(lin_reg_summary_9)
print(confint(lin_reg_9))
lin_reg_10 <- lm(energy ~ staples + nonstaples_animal + nonstaples_other + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_10 <- summary(lin_reg_10)
print(lin_reg_summary_10)
print(confint(lin_reg_10))
lin_reg_11 <- lm(energy ~ staples + nonstaples_animal + nonstaples_other + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year, input_data)
lin_reg_summary_11 <- summary(lin_reg_11)
print(lin_reg_summary_11)
print(confint(lin_reg_11))
lin_reg_12 <- lm(energy ~ 0 + staples + nonstaples_animal + nonstaples_other + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_12 <- summary(lin_reg_12)
print(lin_reg_summary_12)
print(confint(lin_reg_12))
lin_reg_13 <- lm(energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_13 <- summary(lin_reg_13)
print(lin_reg_summary_13)
print(confint(lin_reg_13))
lin_reg_14 <- lm(energy ~ 0 + PKcal +staples_frac + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_14 <- summary(lin_reg_14)
print(lin_reg_summary_14)
print(confint(lin_reg_14))
lin_reg_15 <- lm(energy ~ 0 + PKcal +nonstaples_frac + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_15 <- summary(lin_reg_15)
print(lin_reg_summary_15)
print(confint(lin_reg_15))
lin_reg_16 <- lm(energy ~ 0 + PKcal*staples_frac + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_16 <- summary(lin_reg_16)
print(lin_reg_summary_16)
print(confint(lin_reg_16))
lin_reg_17 <- lm(energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits + Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain + OtherMeat_Fish +
Poultry + Rice + RootTuber + SheepGoat + Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_17 <- summary(lin_reg_17)
print(lin_reg_summary_17)
print(confint(lin_reg_17))
lin_reg_18 <- lm(energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_18 <- summary(lin_reg_18)
print(lin_reg_summary_18)
print(confint(lin_reg_18))
lin_reg_19 <- lm(energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_19 <- summary(lin_reg_19)
print(lin_reg_summary_19)
print(confint(lin_reg_19))
lin_reg_18 <- lm(energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) + year, input_data)
lin_reg_summary_18 <- summary(lin_reg_18)
print(lin_reg_summary_18)
print(confint(lin_reg_18))
# get key values from the model using just calorie production, and plot
pval <- lin_reg_summary_1$coef[2,4]
Rsq <- lin_reg_summary_1$adj.r.squared
slope <- lin_reg_summary_1$coef[[2]]
# plot
x_for_lin_reg_plot <- c(min(input_data$PKcal), max(input_data$PKcal))
plot_ly(input_data) %>%
add_trace(x = ~PKcal,
y = ~energy,
color = ~country_name,
colors = palette36,
type = "scatter",
mode = "markers") %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lin_reg_1, data.frame(PKcal = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Calorie production (PKcal)"),
yaxis = list(title = "Food processing energy use (EJ)"),
title = "Food processing energy use vs calories of food production")
# plot pairs
jpeg(filename = paste0(fig_dir, "/relationships_pair_plot_", sel_name, " .png", width = 1000, height = 1000))
pairs(input_data %>% dplyr::select(energy, PKcal, calperg_food_w_calorie, GDP_pcap_thous2015USD_FAO, GDP_pcap_thous2015USD_calc), pch = 16)
dev.off()
# # plot an interaction plot for GDP per capita, food production, and food processing energy use
# # first need to bin into GDP classes and calculate means
# input_data_GDP_classes <- input_data %>%
# mutate(GDP_pcap_class = case_when(GDP_pcap_thous2015USD_FAO < 2 ~ "< 2",
# GDP_pcap_thous2015USD_FAO >=2 & GDP_pcap_thous2015USD_FAO <10 ~ "2-10",
# GDP_pcap_thous2015USD_FAO >=10 & GDP_pcap_thous2015USD_FAO <20 ~ "10-20",
# GDP_pcap_thous2015USD_FAO >=2 & GDP_pcap_thous2015USD_FAO <40 ~ "20-40",
# GDP_pcap_thous2015USD_FAO >= 40 ~ ">= 40")) %>%
# group_by(GDP_pcap_class) %>%
# summarize(energy = mean(energy),
# MKcal = mean(MKcal))
}
# select data where food processing energy use is nonzero, and within 2010-2015
comb_data_sel_1 <- comb_data_sel_cats %>%
filter(year >= 2010 & year <= 2015,
!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0)
calc_lin_model_food_en_use_production(comb_data_sel_1, "1")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.01181 -0.02354 -0.01831 -0.00454 0.85550
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.018126 0.006123 2.96 0.00319 **
## PKcal 0.864092 0.030431 28.39 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1494 on 644 degrees of freedom
## Multiple R-squared: 0.556, Adjusted R-squared: 0.5553
## F-statistic: 806.3 on 1 and 644 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.02350 -0.00577 -0.00021 0.01344 0.86311
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 0.88939 0.02938 30.27 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1503 on 645 degrees of freedom
## Multiple R-squared: 0.5869, Adjusted R-squared: 0.5862
## F-statistic: 916.3 on 1 and 645 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99834 -0.03114 -0.01757 0.00496 0.85211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.217e-01 3.286e-02 3.703 0.000231 ***
## PKcal 8.569e-01 3.030e-02 28.281 < 2e-16 ***
## calperg_food_w_calorie -5.837e-05 1.820e-05 -3.207 0.001408 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1483 on 643 degrees of freedom
## Multiple R-squared: 0.5629, Adjusted R-squared: 0.5616
## F-statistic: 414.1 on 2 and 643 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98915 -0.02653 -0.01055 0.00692 0.79933
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.962e-02 3.476e-02 2.003 0.0456 *
## PKcal 8.632e-01 3.007e-02 28.706 < 2e-16 ***
## calperg_food_w_calorie -4.050e-05 1.856e-05 -2.182 0.0294 *
## GDP_pcap_thous2015USD_FAO 1.367e-03 3.025e-04 4.519 7.42e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.147 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5765, Adjusted R-squared: 0.5745
## F-statistic: 287.7 on 3 and 634 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.97421 -0.03630 -0.01504 0.02319 0.80388
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.407e-02 3.669e-02 0.656 0.512
## PKcal 8.580e-01 2.975e-02 28.838 < 2e-16 ***
## calperg_food_w_calorie -2.564e-05 1.885e-05 -1.360 0.174
## log(GDP_pcap_thous2015USD_FAO) 2.289e-02 3.991e-03 5.736 1.5e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1456 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5844, Adjusted R-squared: 0.5825
## F-statistic: 297.2 on 3 and 634 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99020 -0.02852 -0.00995 0.00726 0.80982
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.420e-02 3.613e-02 2.054 0.0404 *
## PKcal 8.641e-01 3.053e-02 28.306 < 2e-16 ***
## calperg_food_w_calorie -4.297e-05 1.941e-05 -2.214 0.0272 *
## GDP_pcap_thous2015USD_calc 1.162e-03 2.706e-04 4.293 2.05e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.149 on 618 degrees of freedom
## (24 observations deleted due to missingness)
## Multiple R-squared: 0.5747, Adjusted R-squared: 0.5726
## F-statistic: 278.4 on 3 and 618 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.97781 -0.03602 -0.01137 0.02027 0.80173
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.024337 0.008930 -2.725 0.0066 **
## PKcal 0.860976 0.029690 28.999 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.024562 0.003799 6.465 2.02e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1457 on 635 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5832, Adjusted R-squared: 0.5819
## F-statistic: 444.3 on 2 and 635 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.41798 -0.00805 -0.00420 0.00125 0.67717
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.418e-03 3.265e-03 1.353 0.176508
## PKcal -4.747e-01 1.352e-01 -3.511 0.000479 ***
## PKcal:calperg_food_w_calorie 1.467e-04 7.171e-05 2.046 0.041203 *
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.327e-01 2.169e-02 33.782 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0762 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.8862, Adjusted R-squared: 0.8856
## F-statistic: 1645 on 3 and 634 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.41722 -0.01287 -0.00408 0.00337 0.67410
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.262e-02 1.965e-02 2.169 0.03045 *
## PKcal -5.802e-01 1.430e-01 -4.058 5.58e-05 ***
## calperg_food_w_calorie -1.776e-05 1.014e-05 -1.752 0.08033 .
## log(GDP_pcap_thous2015USD_FAO) -4.259e-03 2.249e-03 -1.894 0.05874 .
## PKcal:calperg_food_w_calorie 1.973e-04 7.503e-05 2.630 0.00874 **
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.496e-01 2.335e-02 32.100 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07602 on 632 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.8871, Adjusted R-squared: 0.8862
## F-statistic: 992.7 on 5 and 632 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 4.035073e-03 8.120066e-02
## PKcal -8.609476e-01 -2.994020e-01
## calperg_food_w_calorie -3.766449e-05 2.150544e-06
## log(GDP_pcap_thous2015USD_FAO) -8.675134e-03 1.578573e-04
## PKcal:calperg_food_w_calorie 5.001924e-05 3.446844e-04
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.037600e-01 7.954772e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.97083 -0.03615 -0.01493 0.02335 0.80036
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.780e+00 6.837e+00 0.407 0.684
## PKcal 8.580e-01 2.977e-02 28.819 < 2e-16 ***
## calperg_food_w_calorie -2.578e-05 1.887e-05 -1.366 0.172
## log(GDP_pcap_thous2015USD_FAO) 2.290e-02 3.993e-03 5.734 1.52e-08 ***
## year -1.369e-03 3.397e-03 -0.403 0.687
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1457 on 633 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5846, Adjusted R-squared: 0.5819
## F-statistic: 222.7 on 4 and 633 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.064652e+01 1.620604e+01
## PKcal 7.995219e-01 9.164470e-01
## calperg_food_w_calorie -6.282264e-05 1.127161e-05
## log(GDP_pcap_thous2015USD_FAO) 1.505524e-02 3.073929e-02
## year -8.039782e-03 5.301493e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.069183 -0.001741 -0.000027 0.001548 0.138896
##
## Coefficients:
## Estimate Std. Error
## (Intercept) -5.549e-01 7.257e-01
## PKcal -8.255e-01 9.125e-02
## calperg_food_w_calorie -3.532e-05 1.148e-05
## log(GDP_pcap_thous2015USD_FAO) 1.657e-02 1.028e-02
## year 2.879e-04 3.639e-04
## country_nameAlgeria 7.423e-02 1.099e-02
## country_nameArgentina 1.096e-01 1.877e-02
## country_nameArmenia 2.616e-03 7.304e-03
## country_nameAustralia 1.392e-01 2.865e-02
## country_nameAustria 1.291e-02 2.852e-02
## country_nameAzerbaijan 2.331e-02 9.401e-03
## country_nameBelarus 3.373e-02 9.140e-03
## country_nameBelgium 4.820e-02 2.753e-02
## country_nameBenin 3.914e-02 1.672e-02
## country_nameBosnia and Herzegovina 3.567e-03 7.683e-03
## country_nameBotswana 8.772e-03 1.186e-02
## country_nameBrazil 1.153e+00 2.384e-02
## country_nameBulgaria 2.548e-02 1.276e-02
## country_nameBurkina Faso 7.057e-02 2.106e-02
## country_nameBurundi 3.992e-02 2.784e-02
## country_nameCameroon 4.346e-02 1.379e-02
## country_nameCanada 7.178e-02 2.761e-02
## country_nameCape Verde 2.675e-02 1.148e-02
## country_nameCentral African Republic 5.310e-02 2.278e-02
## country_nameChad 8.174e-02 2.242e-02
## country_nameChile 1.715e-02 1.838e-02
## country_nameChina 3.086e+00 1.460e-01
## country_nameColombia 1.139e-01 1.062e-02
## country_nameComoros 4.358e-02 1.555e-02
## country_nameCongo 2.434e-02 1.057e-02
## country_nameCosta Rica 2.633e-02 1.647e-02
## country_nameCote dIvoire 5.882e-02 1.289e-02
## country_nameCroatia 5.145e-03 1.523e-02
## country_nameCyprus -1.450e-02 2.230e-02
## country_nameCzech Republic 2.384e-02 1.903e-02
## country_nameDenmark -4.481e-05 2.938e-02
## country_nameDjibouti 4.975e-02 1.644e-02
## country_nameDominican Republic 2.979e-02 1.018e-02
## country_nameEstonia -1.390e-02 1.770e-02
## country_nameFinland -1.104e-02 2.712e-02
## country_nameFrance 2.504e-01 2.659e-02
## country_nameGabon -1.195e-03 1.111e-02
## country_nameGambia 8.494e-02 2.494e-02
## country_nameGeorgia 2.320e-02 9.897e-03
## country_nameGermany 2.681e-01 2.686e-02
## country_nameGreece 1.499e-02 1.927e-02
## country_nameGuinea 5.767e-02 1.907e-02
## country_nameGuinea-Bissau 6.498e-02 2.197e-02
## country_nameHungary 3.159e-02 1.713e-02
## country_nameIceland -3.210e-02 2.867e-02
## country_nameIndia 1.028e+00 1.062e-01
## country_nameIndonesia 2.765e-01 2.699e-02
## country_nameIreland -9.819e-03 2.862e-02
## country_nameIsrael -7.875e-03 2.619e-02
## country_nameItaly 1.591e-01 2.457e-02
## country_nameJamaica 8.028e-03 9.565e-03
## country_nameJapan 3.219e-01 2.645e-02
## country_nameKazakhstan 2.473e-02 1.259e-02
## country_nameKenya 5.918e-02 1.390e-02
## country_nameKorea, Republic of 1.061e-01 2.297e-02
## country_nameKyrgyzstan 3.027e-02 1.523e-02
## country_nameLatvia -5.859e-03 1.535e-02
## country_nameLesotho 5.191e-02 1.711e-02
## country_nameLiberia 6.066e-02 2.199e-02
## country_nameLithuania -1.535e-03 1.562e-02
## country_nameLuxembourg -4.852e-02 3.584e-02
## country_nameMacedonia, the former Yugoslav Republic of 5.590e-03 8.287e-03
## country_nameMadagascar 7.169e-02 2.324e-02
## country_nameMalawi 6.746e-02 2.385e-02
## country_nameMali 6.175e-02 1.977e-02
## country_nameMalta -1.797e-02 2.113e-02
## country_nameMauritania 6.503e-02 1.916e-02
## country_nameMexico 1.857e-01 1.833e-02
## country_nameMoldova, Republic of 3.776e-02 1.219e-02
## country_nameMontenegro 7.187e-04 1.013e-02
## country_nameMorocco 7.161e-02 1.237e-02
## country_nameMozambique 6.968e-02 2.211e-02
## country_nameMyanmar 9.683e-02 1.834e-02
## country_nameNetherlands 6.629e-02 2.734e-02
## country_nameNew Zealand 1.984e-02 2.672e-02
## country_nameNorway -1.898e-02 3.248e-02
## country_namePhilippines 1.906e-01 1.552e-02
## country_namePoland 1.106e-01 1.572e-02
## country_namePortugal 1.120e-02 1.911e-02
## country_nameRomania 3.308e-02 1.107e-02
## country_nameRussian Federation 4.730e-01 1.898e-02
## country_nameRwanda 3.432e-02 1.904e-02
## country_nameSao Tome and Principe 3.625e-02 1.354e-02
## country_nameSenegal 7.497e-02 1.982e-02
## country_nameSerbia 3.613e-02 9.329e-03
## country_nameSeychelles 1.476e-02 2.122e-02
## country_nameSierra Leone 6.247e-02 2.089e-02
## country_nameSlovakia 8.389e-03 1.939e-02
## country_nameSlovenia -1.258e-02 2.034e-02
## country_nameSouth Africa 7.717e-02 1.575e-02
## country_nameSpain 1.103e-01 2.150e-02
## country_nameSudan 6.729e-02 1.343e-02
## country_nameSwaziland 2.077e-02 1.053e-02
## country_nameSweden -7.064e-03 2.864e-02
## country_nameSwitzerland -7.889e-03 3.425e-02
## country_nameTajikistan 4.294e-02 1.691e-02
## country_nameThailand 3.627e-01 1.410e-02
## country_nameTogo 6.395e-02 2.140e-02
## country_nameTunisia 2.919e-02 9.297e-03
## country_nameTurkey 1.598e-01 1.520e-02
## country_nameUganda 5.705e-02 1.856e-02
## country_nameUkraine 1.271e-01 1.048e-02
## country_nameUnited Kingdom 1.464e-01 2.699e-02
## country_nameUnited States of America 1.486e+00 4.431e-02
## country_nameUruguay 5.752e-03 1.963e-02
## country_nameVenezuela 5.172e-02 1.832e-02
## country_nameViet Nam 2.014e-01 1.582e-02
## country_nameZimbabwe 7.199e-02 1.919e-02
## t value Pr(>|t|)
## (Intercept) -0.765 0.444850
## PKcal -9.047 < 2e-16 ***
## calperg_food_w_calorie -3.077 0.002197 **
## log(GDP_pcap_thous2015USD_FAO) 1.612 0.107484
## year 0.791 0.429247
## country_nameAlgeria 6.753 3.84e-11 ***
## country_nameArgentina 5.838 9.25e-09 ***
## country_nameArmenia 0.358 0.720353
## country_nameAustralia 4.859 1.56e-06 ***
## country_nameAustria 0.453 0.651037
## country_nameAzerbaijan 2.479 0.013469 *
## country_nameBelarus 3.690 0.000247 ***
## country_nameBelgium 1.751 0.080551 .
## country_nameBenin 2.340 0.019636 *
## country_nameBosnia and Herzegovina 0.464 0.642672
## country_nameBotswana 0.739 0.459970
## country_nameBrazil 48.355 < 2e-16 ***
## country_nameBulgaria 1.996 0.046431 *
## country_nameBurkina Faso 3.350 0.000866 ***
## country_nameBurundi 1.434 0.152183
## country_nameCameroon 3.151 0.001718 **
## country_nameCanada 2.600 0.009586 **
## country_nameCape Verde 2.330 0.020172 *
## country_nameCentral African Republic 2.331 0.020145 *
## country_nameChad 3.646 0.000293 ***
## country_nameChile 0.933 0.351023
## country_nameChina 21.138 < 2e-16 ***
## country_nameColombia 10.726 < 2e-16 ***
## country_nameComoros 2.802 0.005263 **
## country_nameCongo 2.302 0.021740 *
## country_nameCosta Rica 1.599 0.110359
## country_nameCote dIvoire 4.561 6.33e-06 ***
## country_nameCroatia 0.338 0.735629
## country_nameCyprus -0.650 0.515934
## country_nameCzech Republic 1.252 0.211032
## country_nameDenmark -0.002 0.998784
## country_nameDjibouti 3.025 0.002607 **
## country_nameDominican Republic 2.926 0.003586 **
## country_nameEstonia -0.785 0.432765
## country_nameFinland -0.407 0.684079
## country_nameFrance 9.416 < 2e-16 ***
## country_nameGabon -0.108 0.914388
## country_nameGambia 3.405 0.000712 ***
## country_nameGeorgia 2.344 0.019432 *
## country_nameGermany 9.981 < 2e-16 ***
## country_nameGreece 0.778 0.436960
## country_nameGuinea 3.024 0.002618 **
## country_nameGuinea-Bissau 2.958 0.003241 **
## country_nameHungary 1.844 0.065709 .
## country_nameIceland -1.119 0.263492
## country_nameIndia 9.679 < 2e-16 ***
## country_nameIndonesia 10.245 < 2e-16 ***
## country_nameIreland -0.343 0.731643
## country_nameIsrael -0.301 0.763793
## country_nameItaly 6.476 2.17e-10 ***
## country_nameJamaica 0.839 0.401692
## country_nameJapan 12.171 < 2e-16 ***
## country_nameKazakhstan 1.965 0.049986 *
## country_nameKenya 4.258 2.45e-05 ***
## country_nameKorea, Republic of 4.619 4.86e-06 ***
## country_nameKyrgyzstan 1.988 0.047361 *
## country_nameLatvia -0.382 0.702891
## country_nameLesotho 3.035 0.002525 **
## country_nameLiberia 2.759 0.006001 **
## country_nameLithuania -0.098 0.921718
## country_nameLuxembourg -1.354 0.176422
## country_nameMacedonia, the former Yugoslav Republic of 0.675 0.500263
## country_nameMadagascar 3.084 0.002147 **
## country_nameMalawi 2.829 0.004853 **
## country_nameMali 3.124 0.001882 **
## country_nameMalta -0.851 0.395308
## country_nameMauritania 3.394 0.000740 ***
## country_nameMexico 10.132 < 2e-16 ***
## country_nameMoldova, Republic of 3.097 0.002062 **
## country_nameMontenegro 0.071 0.943470
## country_nameMorocco 5.791 1.21e-08 ***
## country_nameMozambique 3.151 0.001720 **
## country_nameMyanmar 5.280 1.89e-07 ***
## country_nameNetherlands 2.425 0.015660 *
## country_nameNew Zealand 0.743 0.457964
## country_nameNorway -0.584 0.559257
## country_namePhilippines 12.279 < 2e-16 ***
## country_namePoland 7.033 6.33e-12 ***
## country_namePortugal 0.586 0.558148
## country_nameRomania 2.987 0.002945 **
## country_nameRussian Federation 24.927 < 2e-16 ***
## country_nameRwanda 1.803 0.072017 .
## country_nameSao Tome and Principe 2.678 0.007636 **
## country_nameSenegal 3.784 0.000172 ***
## country_nameSerbia 3.872 0.000121 ***
## country_nameSeychelles 0.695 0.487084
## country_nameSierra Leone 2.990 0.002922 **
## country_nameSlovakia 0.433 0.665370
## country_nameSlovenia -0.618 0.536518
## country_nameSouth Africa 4.901 1.27e-06 ***
## country_nameSpain 5.129 4.11e-07 ***
## country_nameSudan 5.010 7.44e-07 ***
## country_nameSwaziland 1.972 0.049094 *
## country_nameSweden -0.247 0.805266
## country_nameSwitzerland -0.230 0.817956
## country_nameTajikistan 2.539 0.011411 *
## country_nameThailand 25.722 < 2e-16 ***
## country_nameTogo 2.988 0.002941 **
## country_nameTunisia 3.140 0.001787 **
## country_nameTurkey 10.511 < 2e-16 ***
## country_nameUganda 3.073 0.002227 **
## country_nameUkraine 12.137 < 2e-16 ***
## country_nameUnited Kingdom 5.423 8.95e-08 ***
## country_nameUnited States of America 33.543 < 2e-16 ***
## country_nameUruguay 0.293 0.769609
## country_nameVenezuela 2.824 0.004929 **
## country_nameViet Nam 12.730 < 2e-16 ***
## country_nameZimbabwe 3.752 0.000195 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01246 on 525 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9975, Adjusted R-squared: 0.9969
## F-statistic: 1854 on 112 and 525 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -1.980631e+00
## PKcal -1.004752e+00
## calperg_food_w_calorie -5.787127e-05
## log(GDP_pcap_thous2015USD_FAO) -3.619446e-03
## year -4.270251e-04
## country_nameAlgeria 5.263801e-02
## country_nameArgentina 7.271895e-02
## country_nameArmenia -1.173270e-02
## country_nameAustralia 8.293987e-02
## country_nameAustria -4.312640e-02
## country_nameAzerbaijan 4.841475e-03
## country_nameBelarus 1.577474e-02
## country_nameBelgium -5.880526e-03
## country_nameBenin 6.286529e-03
## country_nameBosnia and Herzegovina -1.152665e-02
## country_nameBotswana -1.453202e-02
## country_nameBrazil 1.105739e+00
## country_nameBulgaria 4.044101e-04
## country_nameBurkina Faso 2.918833e-02
## country_nameBurundi -1.477016e-02
## country_nameCameroon 1.636968e-02
## country_nameCanada 1.754297e-02
## country_nameCape Verde 4.198727e-03
## country_nameCentral African Republic 8.344757e-03
## country_nameChad 3.769479e-02
## country_nameChile -1.894807e-02
## country_nameChina 2.798967e+00
## country_nameColombia 9.307724e-02
## country_nameComoros 1.302905e-02
## country_nameCongo 3.565765e-03
## country_nameCosta Rica -6.013458e-03
## country_nameCote dIvoire 3.348522e-02
## country_nameCroatia -2.477421e-02
## country_nameCyprus -5.831089e-02
## country_nameCzech Republic -1.355652e-02
## country_nameDenmark -5.775308e-02
## country_nameDjibouti 1.744174e-02
## country_nameDominican Republic 9.788118e-03
## country_nameEstonia -4.866697e-02
## country_nameFinland -6.431067e-02
## country_nameFrance 1.981266e-01
## country_nameGabon -2.302766e-02
## country_nameGambia 3.593649e-02
## country_nameGeorgia 3.759357e-03
## country_nameGermany 2.153417e-01
## country_nameGreece -2.286473e-02
## country_nameGuinea 2.020424e-02
## country_nameGuinea-Bissau 2.182004e-02
## country_nameHungary -2.059708e-03
## country_nameIceland -8.842484e-02
## country_nameIndia 8.195176e-01
## country_nameIndonesia 2.235155e-01
## country_nameIreland -6.603268e-02
## country_nameIsrael -5.932702e-02
## country_nameItaly 1.108561e-01
## country_nameJamaica -1.076300e-02
## country_nameJapan 2.699452e-01
## country_nameKazakhstan 1.524956e-06
## country_nameKenya 3.187353e-02
## country_nameKorea, Republic of 6.098393e-02
## country_nameKyrgyzstan 3.538117e-04
## country_nameLatvia -3.601671e-02
## country_nameLesotho 1.830970e-02
## country_nameLiberia 1.746856e-02
## country_nameLithuania -3.221524e-02
## country_nameLuxembourg -1.189341e-01
## country_nameMacedonia, the former Yugoslav Republic of -1.069004e-02
## country_nameMadagascar 2.602820e-02
## country_nameMalawi 2.060876e-02
## country_nameMali 2.292058e-02
## country_nameMalta -5.947890e-02
## country_nameMauritania 2.739145e-02
## country_nameMexico 1.496766e-01
## country_nameMoldova, Republic of 1.380423e-02
## country_nameMontenegro -1.918427e-02
## country_nameMorocco 4.731537e-02
## country_nameMozambique 2.623734e-02
## country_nameMyanmar 6.080452e-02
## country_nameNetherlands 1.258069e-02
## country_nameNew Zealand -3.264224e-02
## country_nameNorway -8.279069e-02
## country_namePhilippines 1.601130e-01
## country_namePoland 7.967438e-02
## country_namePortugal -2.634760e-02
## country_nameRomania 1.132800e-02
## country_nameRussian Federation 4.357267e-01
## country_nameRwanda -3.081439e-03
## country_nameSao Tome and Principe 9.659520e-03
## country_nameSenegal 3.604754e-02
## country_nameSerbia 1.779842e-02
## country_nameSeychelles -2.693550e-02
## country_nameSierra Leone 2.142573e-02
## country_nameSlovakia -2.969377e-02
## country_nameSlovenia -5.254972e-02
## country_nameSouth Africa 4.623908e-02
## country_nameSpain 6.803052e-02
## country_nameSudan 4.090639e-02
## country_nameSwaziland 8.271596e-05
## country_nameSweden -6.332491e-02
## country_nameSwitzerland -7.518162e-02
## country_nameTajikistan 9.714290e-03
## country_nameThailand 3.350414e-01
## country_nameTogo 2.190260e-02
## country_nameTunisia 1.092525e-02
## country_nameTurkey 1.299362e-01
## country_nameUganda 2.058468e-02
## country_nameUkraine 1.065575e-01
## country_nameUnited Kingdom 9.335147e-02
## country_nameUnited States of America 1.399180e+00
## country_nameUruguay -3.280796e-02
## country_nameVenezuela 1.573480e-02
## country_nameViet Nam 1.703108e-01
## country_nameZimbabwe 3.429889e-02
## 97.5 %
## (Intercept) 8.708132e-01
## PKcal -6.462405e-01
## calperg_food_w_calorie -1.277389e-05
## log(GDP_pcap_thous2015USD_FAO) 3.676537e-02
## year 1.002816e-03
## country_nameAlgeria 9.582319e-02
## country_nameArgentina 1.464743e-01
## country_nameArmenia 1.696507e-02
## country_nameAustralia 1.955176e-01
## country_nameAustria 6.894569e-02
## country_nameAzerbaijan 4.177707e-02
## country_nameBelarus 5.168487e-02
## country_nameBelgium 1.022795e-01
## country_nameBenin 7.199109e-02
## country_nameBosnia and Herzegovina 1.866018e-02
## country_nameBotswana 3.207506e-02
## country_nameBrazil 1.199389e+00
## country_nameBulgaria 5.055410e-02
## country_nameBurkina Faso 1.119521e-01
## country_nameBurundi 9.461065e-02
## country_nameCameroon 7.055767e-02
## country_nameCanada 1.260109e-01
## country_nameCape Verde 4.930410e-02
## country_nameCentral African Republic 9.786465e-02
## country_nameChad 1.257856e-01
## country_nameChile 5.325630e-02
## country_nameChina 3.372520e+00
## country_nameColombia 1.348164e-01
## country_nameComoros 7.413893e-02
## country_nameCongo 4.510627e-02
## country_nameCosta Rica 5.868031e-02
## country_nameCote dIvoire 8.414785e-02
## country_nameCroatia 3.506444e-02
## country_nameCyprus 2.931485e-02
## country_nameCzech Republic 6.122743e-02
## country_nameDenmark 5.766347e-02
## country_nameDjibouti 8.205304e-02
## country_nameDominican Republic 4.979788e-02
## country_nameEstonia 2.087558e-02
## country_nameFinland 4.223063e-02
## country_nameFrance 3.025964e-01
## country_nameGabon 2.063698e-02
## country_nameGambia 1.339355e-01
## country_nameGeorgia 4.264400e-02
## country_nameGermany 3.208889e-01
## country_nameGreece 5.284574e-02
## country_nameGuinea 9.514301e-02
## country_nameGuinea-Bissau 1.081497e-01
## country_nameHungary 6.524461e-02
## country_nameIceland 2.423237e-02
## country_nameIndia 1.236876e+00
## country_nameIndonesia 3.295692e-01
## country_nameIreland 4.639565e-02
## country_nameIsrael 4.357774e-02
## country_nameItaly 2.073947e-01
## country_nameJamaica 2.681906e-02
## country_nameJapan 3.738632e-01
## country_nameKazakhstan 4.945988e-02
## country_nameKenya 8.647830e-02
## country_nameKorea, Republic of 1.512470e-01
## country_nameKyrgyzstan 6.018229e-02
## country_nameLatvia 2.429947e-02
## country_nameLesotho 8.551596e-02
## country_nameLiberia 1.038612e-01
## country_nameLithuania 2.914439e-02
## country_nameLuxembourg 2.189371e-02
## country_nameMacedonia, the former Yugoslav Republic of 2.187015e-02
## country_nameMadagascar 1.173429e-01
## country_nameMalawi 1.143083e-01
## country_nameMali 1.005807e-01
## country_nameMalta 2.353118e-02
## country_nameMauritania 1.026587e-01
## country_nameMexico 2.216757e-01
## country_nameMoldova, Republic of 6.171205e-02
## country_nameMontenegro 2.062176e-02
## country_nameMorocco 9.590333e-02
## country_nameMozambique 1.131197e-01
## country_nameMyanmar 1.328517e-01
## country_nameNetherlands 1.200012e-01
## country_nameNew Zealand 7.233167e-02
## country_nameNorway 4.483092e-02
## country_namePhilippines 2.211021e-01
## country_namePoland 1.414368e-01
## country_namePortugal 4.874678e-02
## country_nameRomania 5.483750e-02
## country_nameRussian Federation 5.102815e-01
## country_nameRwanda 7.172387e-02
## country_nameSao Tome and Principe 6.284360e-02
## country_nameSenegal 1.139023e-01
## country_nameSerbia 5.445194e-02
## country_nameSeychelles 5.645706e-02
## country_nameSierra Leone 1.035212e-01
## country_nameSlovakia 4.647233e-02
## country_nameSlovenia 2.738376e-02
## country_nameSouth Africa 1.081023e-01
## country_nameSpain 1.524979e-01
## country_nameSudan 9.367656e-02
## country_nameSwaziland 4.146253e-02
## country_nameSweden 4.919669e-02
## country_nameSwitzerland 5.940458e-02
## country_nameTajikistan 7.617172e-02
## country_nameThailand 3.904496e-01
## country_nameTogo 1.059987e-01
## country_nameTunisia 4.745303e-02
## country_nameTurkey 1.896714e-01
## country_nameUganda 9.352320e-02
## country_nameUkraine 1.477137e-01
## country_nameUnited Kingdom 1.993980e-01
## country_nameUnited States of America 1.573265e+00
## country_nameUruguay 4.431167e-02
## country_nameVenezuela 8.769523e-02
## country_nameViet Nam 2.324678e-01
## country_nameZimbabwe 1.096871e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.29504 -0.01306 -0.00477 0.00390 0.48182
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.763e+00 2.957e+00 1.273 0.204
## staples -2.851e+00 9.110e-02 -31.301 <2e-16 ***
## nonstaples_animal 8.577e+00 1.690e-01 50.744 <2e-16 ***
## nonstaples_other 3.050e+00 1.726e-01 17.673 <2e-16 ***
## calperg_food_w_calorie 8.922e-06 8.207e-06 1.087 0.277
## log(GDP_pcap_thous2015USD_FAO) -2.994e-03 1.813e-03 -1.652 0.099 .
## year -1.874e-03 1.469e-03 -1.276 0.203
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06299 on 631 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9226, Adjusted R-squared: 0.9218
## F-statistic: 1253 on 6 and 631 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -2.043431e+00 9.568995e+00
## staples -3.030340e+00 -2.672553e+00
## nonstaples_animal 8.245133e+00 8.908974e+00
## nonstaples_other 2.710684e+00 3.388392e+00
## calperg_food_w_calorie -7.193994e-06 2.503732e-05
## log(GDP_pcap_thous2015USD_FAO) -6.553738e-03 5.648498e-04
## year -4.758675e-03 1.010753e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.29482 -0.01323 -0.00518 0.00372 0.47772
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.807e+00 2.951e+00 1.290 0.1975
## staples -2.865e+00 9.051e-02 -31.653 <2e-16 ***
## nonstaples_animal 8.576e+00 1.675e-01 51.201 <2e-16 ***
## nonstaples_other 3.072e+00 1.724e-01 17.825 <2e-16 ***
## calperg_food_w_calorie 9.203e-06 8.013e-06 1.149 0.2512
## GDP_pcap_thous2015USD_FAO -3.073e-04 1.348e-04 -2.280 0.0229 *
## year -1.896e-03 1.466e-03 -1.293 0.1963
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06287 on 631 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9229, Adjusted R-squared: 0.9221
## F-statistic: 1258 on 6 and 631 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.988387e+00 9.601834e+00
## staples -3.042738e+00 -2.687259e+00
## nonstaples_animal 8.247524e+00 8.905395e+00
## nonstaples_other 2.733742e+00 3.410652e+00
## calperg_food_w_calorie -6.532204e-06 2.493918e-05
## GDP_pcap_thous2015USD_FAO -5.718801e-04 -4.264799e-05
## year -4.775543e-03 9.828022e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.29943 -0.01275 -0.00495 0.00310 0.48678
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -2.850e+00 9.113e-02 -31.270 <2e-16 ***
## nonstaples_animal 8.578e+00 1.691e-01 50.723 <2e-16 ***
## nonstaples_other 3.046e+00 1.726e-01 17.645 <2e-16 ***
## calperg_food_w_calorie 9.167e-06 8.208e-06 1.117 0.2645
## log(GDP_pcap_thous2015USD_FAO) -2.989e-03 1.813e-03 -1.648 0.0998 .
## year -4.516e-06 7.912e-06 -0.571 0.5683
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06302 on 632 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9288, Adjusted R-squared: 0.9281
## F-statistic: 1374 on 6 and 632 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -3.028658e+00 -2.670737e+00
## nonstaples_animal 8.245513e+00 8.909675e+00
## nonstaples_other 2.706773e+00 3.384710e+00
## calperg_food_w_calorie -6.951723e-06 2.528636e-05
## log(GDP_pcap_thous2015USD_FAO) -6.550095e-03 5.719399e-04
## year -2.005355e-05 1.102116e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.97424 -0.03629 -0.01502 0.02318 0.80391
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 8.580e-01 2.975e-02 28.838 < 2e-16 ***
## calperg_food_w_calorie -2.560e-05 1.885e-05 -1.358 0.175
## log(GDP_pcap_thous2015USD_FAO) 2.289e-02 3.991e-03 5.737 1.49e-08 ***
## year 1.192e-05 1.823e-05 0.654 0.513
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1456 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.6187, Adjusted R-squared: 0.6163
## F-statistic: 257.2 on 4 and 634 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 7.995705e-01 9.164182e-01
## calperg_food_w_calorie -6.261227e-05 1.141344e-05
## log(GDP_pcap_thous2015USD_FAO) 1.505768e-02 3.073134e-02
## year -2.387588e-05 4.770971e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98372 -0.03904 -0.01543 0.02234 0.79650
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 8.673e-01 3.002e-02 28.893 <2e-16 ***
## staples_frac -1.731e-01 8.383e-02 -2.065 0.0393 *
## calperg_food_w_calorie -1.563e-05 1.941e-05 -0.805 0.4210
## log(GDP_pcap_thous2015USD_FAO) 1.107e-02 6.973e-03 1.588 0.1128
## year 5.381e-05 2.724e-05 1.975 0.0487 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1452 on 633 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.6213, Adjusted R-squared: 0.6183
## F-statistic: 207.7 on 5 and 633 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 8.083932e-01 9.262897e-01
## staples_frac -3.377220e-01 -8.484291e-03
## calperg_food_w_calorie -5.374603e-05 2.248592e-05
## log(GDP_pcap_thous2015USD_FAO) -2.618832e-03 2.476566e-02
## year 3.144555e-07 1.073059e-04
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98352 -0.03903 -0.01542 0.02225 0.79627
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 8.674e-01 3.002e-02 28.895 <2e-16 ***
## nonstaples_frac 1.734e-01 8.380e-02 2.069 0.0389 *
## calperg_food_w_calorie -1.562e-05 1.941e-05 -0.805 0.4211
## log(GDP_pcap_thous2015USD_FAO) 1.105e-02 6.971e-03 1.586 0.1133
## year -3.227e-05 2.804e-05 -1.151 0.2503
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1452 on 633 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.6213, Adjusted R-squared: 0.6183
## F-statistic: 207.7 on 5 and 633 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 8.084105e-01 9.263043e-01
## nonstaples_frac 8.848123e-03 3.379745e-01
## calperg_food_w_calorie -5.373537e-05 2.248879e-05
## log(GDP_pcap_thous2015USD_FAO) -2.636386e-03 2.474147e-02
## year -8.734256e-05 2.280116e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68595 -0.01264 0.00029 0.00932 0.51872
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 5.930e+00 1.351e-01 43.896 < 2e-16 ***
## staples_frac 1.552e-01 4.730e-02 3.282 0.00109 **
## calperg_food_w_calorie -1.617e-05 1.076e-05 -1.502 0.13347
## log(GDP_pcap_thous2015USD_FAO) 6.480e-03 3.869e-03 1.675 0.09447 .
## year -3.025e-05 1.527e-05 -1.981 0.04804 *
## PKcal:staples_frac -9.348e+00 2.476e-01 -37.763 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08053 on 632 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.8837, Adjusted R-squared: 0.8826
## F-statistic: 800.4 on 6 and 632 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 5.664429e+00 6.194966e+00
## staples_frac 6.236469e-02 2.481227e-01
## calperg_food_w_calorie -3.731263e-05 4.964941e-06
## log(GDP_pcap_thous2015USD_FAO) -1.117841e-03 1.407686e-02
## year -6.023850e-05 -2.614746e-07
## PKcal:staples_frac -9.834492e+00 -8.862247e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141096 -0.008143 -0.002257 0.007234 0.206771
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 6.727e-01 2.924e+00 0.230 0.81811
## Corn -7.687e+00 5.679e-01 -13.535 < 2e-16 ***
## Dairy -6.409e+00 1.647e+00 -3.892 0.00011 ***
## FiberCrop 9.426e+01 8.855e+00 10.645 < 2e-16 ***
## Fruits -5.256e+00 2.500e+00 -2.103 0.03589 *
## Legumes 3.638e+00 3.012e+00 1.208 0.22745
## MiscCrop 1.013e+01 1.079e+01 0.939 0.34819
## NutsSeeds -3.612e+00 3.486e+00 -1.036 0.30055
## OilCrop -4.527e+00 1.371e+00 -3.302 0.00102 **
## OilPalm -4.674e+00 2.774e+00 -1.685 0.09255 .
## OtherGrain -9.325e+00 1.074e+00 -8.685 < 2e-16 ***
## OtherMeat_Fish 7.521e+00 3.538e+00 2.126 0.03391 *
## Poultry 2.144e+01 3.259e+00 6.579 1.02e-10 ***
## Rice -1.618e+00 3.102e-01 -5.215 2.52e-07 ***
## RootTuber 4.674e+00 9.629e-01 4.854 1.54e-06 ***
## SheepGoat 4.689e+01 1.417e+01 3.309 0.00099 ***
## Soybean 1.016e+01 1.231e+00 8.251 9.61e-16 ***
## SugarCrop 1.365e+01 1.489e+00 9.169 < 2e-16 ***
## Vegetables -2.620e+01 2.839e+00 -9.228 < 2e-16 ***
## Wheat 8.244e-02 4.632e-01 0.178 0.85881
## NEC 2.204e+00 1.308e+00 1.686 0.09237 .
## Pork 1.426e+01 1.167e+00 12.217 < 2e-16 ***
## calperg_food_w_calorie -4.279e-06 4.716e-06 -0.907 0.36458
## log(GDP_pcap_thous2015USD_FAO) -7.551e-04 1.071e-03 -0.705 0.48121
## year 5.997e-06 4.629e-06 1.296 0.19561
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0304 on 613 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9839, Adjusted R-squared: 0.9833
## F-statistic: 1501 on 25 and 613 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -5.069240e+00 6.414665e+00
## Corn -8.802175e+00 -6.571546e+00
## Dairy -9.642807e+00 -3.174973e+00
## FiberCrop 7.687215e+01 1.116517e+02
## Fruits -1.016451e+01 -3.472298e-01
## Legumes -2.275770e+00 9.552638e+00
## MiscCrop -1.106489e+01 3.133381e+01
## NutsSeeds -1.045790e+01 3.233990e+00
## OilCrop -7.219411e+00 -1.834146e+00
## OilPalm -1.012240e+01 7.743912e-01
## OtherGrain -1.143378e+01 -7.216666e+00
## OtherMeat_Fish 5.733957e-01 1.446814e+01
## Poultry 1.504270e+01 2.784490e+01
## Rice -2.226977e+00 -1.008575e+00
## RootTuber 2.782815e+00 6.564736e+00
## SheepGoat 1.906423e+01 7.471705e+01
## Soybean 7.740069e+00 1.257525e+01
## SugarCrop 1.072917e+01 1.657759e+01
## Vegetables -3.177002e+01 -2.062057e+01
## Wheat -8.272584e-01 9.921336e-01
## NEC -3.637764e-01 4.772280e+00
## Pork 1.197024e+01 1.655566e+01
## calperg_food_w_calorie -1.353990e-05 4.982245e-06
## log(GDP_pcap_thous2015USD_FAO) -2.859011e-03 1.348885e-03
## year -3.093110e-06 1.508629e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.81934 -0.03709 -0.01218 0.01698 0.82354
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.345e-06 4.023e-08 33.433 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.360e-02 3.487e-03 6.768 2.98e-11 ***
## year -1.012e-05 4.055e-06 -2.495 0.0129 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1337 on 635 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.678, Adjusted R-squared: 0.6765
## F-statistic: 445.7 on 3 and 635 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.265966e-06 1.423960e-06
## log(GDP_pcap_thous2015USD_FAO) 1.675146e-02 3.044623e-02
## year -1.807999e-05 -2.153832e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.28833 -0.00607 0.00627 0.00865 0.56639
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -5.980e-07 5.117e-08 -11.688 <2e-16 ***
## Feed_Kt 8.353e-06 2.009e-07 41.584 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) -6.043e-04 1.899e-03 -0.318 0.7504
## year -3.691e-06 2.108e-06 -1.751 0.0804 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0693 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9136, Adjusted R-squared: 0.9131
## F-statistic: 1676 on 4 and 634 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -6.984785e-07 -4.975288e-07
## Feed_Kt 7.958560e-06 8.747459e-06
## log(GDP_pcap_thous2015USD_FAO) -4.333236e-03 3.124562e-03
## year -7.829453e-06 4.483426e-07
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32736 -0.00747 0.00367 0.00582 0.57991
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -3.856e-01 2.943e-02 -13.100 <2e-16 ***
## Feed_Kt 8.183e-06 1.706e-07 47.958 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) -4.572e-04 1.843e-03 -0.248 0.804
## year -2.253e-06 2.074e-06 -1.086 0.278
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06777 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9174, Adjusted R-squared: 0.9169
## F-statistic: 1760 on 4 and 634 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -4.433811e-01 -3.277790e-01
## Feed_Kt 7.847839e-06 8.517956e-06
## log(GDP_pcap_thous2015USD_FAO) -4.076223e-03 3.161807e-03
## year -6.326636e-06 1.820206e-06
## png
## 2
plot_ly(comb_data_sel_1) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_1) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
Mean-centered.
# mean-center GDP per capita, food production, and calories per g
comb_data_sel_1_cent <- comb_data_sel_1 %>%
ungroup() %>%
mutate(PKcal = PKcal - mean(PKcal),
calperg_food_w_calorie = calperg_food_w_calorie - mean(calperg_food_w_calorie),
GDP_pcap_thous2015USD_FAO = GDP_pcap_thous2015USD_FAO - mean(GDP_pcap_thous2015USD_FAO, na.rm = TRUE),
GDP_pcap_thous2015USD_calc = GDP_pcap_thous2015USD_calc - mean(GDP_pcap_thous2015USD_calc, na.rm = TRUE))
calc_lin_model_food_en_use_production(comb_data_sel_1_cent, "1cent")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.01181 -0.02354 -0.01831 -0.00454 0.85550
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.066948 0.005876 11.39 <2e-16 ***
## PKcal 0.864092 0.030431 28.39 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1494 on 644 degrees of freedom
## Multiple R-squared: 0.556, Adjusted R-squared: 0.5553
## F-statistic: 806.3 on 1 and 644 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.94487 0.04340 0.04864 0.06241 0.92244
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 0.86409 0.03333 25.93 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1636 on 645 degrees of freedom
## Multiple R-squared: 0.5103, Adjusted R-squared: 0.5095
## F-statistic: 672.1 on 1 and 645 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99834 -0.03114 -0.01757 0.00496 0.85211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.695e-02 5.835e-03 11.474 < 2e-16 ***
## PKcal 8.569e-01 3.030e-02 28.281 < 2e-16 ***
## calperg_food_w_calorie -5.837e-05 1.820e-05 -3.207 0.00141 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1483 on 643 degrees of freedom
## Multiple R-squared: 0.5629, Adjusted R-squared: 0.5616
## F-statistic: 414.1 on 2 and 643 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98915 -0.02653 -0.01055 0.00692 0.79933
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.718e-02 5.818e-03 11.546 < 2e-16 ***
## PKcal 8.632e-01 3.007e-02 28.706 < 2e-16 ***
## calperg_food_w_calorie -4.050e-05 1.856e-05 -2.182 0.0294 *
## GDP_pcap_thous2015USD_FAO 1.367e-03 3.025e-04 4.519 7.42e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.147 on 634 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5765, Adjusted R-squared: 0.5745
## F-statistic: 287.7 on 3 and 634 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.092527 -0.004901 0.006621 0.016006 0.163954
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.194e-01 6.834e-03 17.475 <2e-16 ***
## PKcal 2.598e+00 3.837e-02 67.712 <2e-16 ***
## calperg_food_w_calorie -4.253e-05 2.406e-05 -1.768 0.0787 .
## log(GDP_pcap_thous2015USD_FAO) 3.444e-03 2.307e-03 1.493 0.1371
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0398 on 186 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.963, Adjusted R-squared: 0.9624
## F-statistic: 1612 on 3 and 186 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99020 -0.02852 -0.00995 0.00726 0.80982
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.731e-02 5.977e-03 11.261 < 2e-16 ***
## PKcal 8.641e-01 3.053e-02 28.306 < 2e-16 ***
## calperg_food_w_calorie -4.297e-05 1.941e-05 -2.214 0.0272 *
## GDP_pcap_thous2015USD_calc 1.162e-03 2.706e-04 4.293 2.05e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.149 on 618 degrees of freedom
## (24 observations deleted due to missingness)
## Multiple R-squared: 0.5747, Adjusted R-squared: 0.5726
## F-statistic: 278.4 on 3 and 618 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.090541 -0.008627 0.007850 0.016507 0.167864
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.120523 0.006844 17.610 <2e-16 ***
## PKcal 2.586143 0.038004 68.050 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.004421 0.002253 1.963 0.0512 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04003 on 187 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9623, Adjusted R-squared: 0.9619
## F-statistic: 2389 on 2 and 187 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.083459 -0.015561 0.004645 0.020176 0.163788
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.1286255 0.0033864 37.983 < 2e-16 ***
## PKcal 2.1326942 0.1681803 12.681 < 2e-16 ***
## PKcal:calperg_food_w_calorie 0.0001651 0.0005296 0.312 0.75549
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.1384368 0.0487813 2.838 0.00505 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03968 on 186 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9632, Adjusted R-squared: 0.9626
## F-statistic: 1622 on 3 and 186 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.08920 -0.01252 -0.00142 0.01226 0.14213
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.345e-02 1.091e-02 3.982 9.84e-05 ***
## PKcal 4.996e-01 2.530e-01 1.975 0.0498 *
## calperg_food_w_calorie -1.893e-05 3.096e-05 -0.611 0.5418
## log(GDP_pcap_thous2015USD_FAO) 2.632e-02 3.473e-03 7.579 1.65e-12 ***
## PKcal:calperg_food_w_calorie -2.797e-04 6.720e-04 -0.416 0.6777
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.826e-01 7.407e-02 7.865 3.04e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03386 on 184 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9735, Adjusted R-squared: 0.9728
## F-statistic: 1351 on 5 and 184 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 0.0219212791 6.498174e-02
## PKcal 0.0004996477 9.987264e-01
## calperg_food_w_calorie -0.0000800090 4.215828e-05
## log(GDP_pcap_thous2015USD_FAO) 0.0194703548 3.317421e-02
## PKcal:calperg_food_w_calorie -0.0016056542 1.046166e-03
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.4364163617 7.287022e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.092832 -0.004793 0.006668 0.016105 0.164237
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.213e-01 3.460e+00 -0.035 0.9721
## PKcal 2.598e+00 3.847e-02 67.522 <2e-16 ***
## calperg_food_w_calorie -4.268e-05 2.421e-05 -1.763 0.0796 .
## log(GDP_pcap_thous2015USD_FAO) 3.450e-03 2.315e-03 1.491 0.1378
## year 1.196e-04 1.719e-03 0.070 0.9446
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03991 on 185 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.963, Adjusted R-squared: 0.9622
## F-statistic: 1202 on 4 and 185 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -6.9482672801 6.705600e+00
## PKcal 2.5220013017 2.673813e+00
## calperg_food_w_calorie -0.0000904436 5.088398e-06
## log(GDP_pcap_thous2015USD_FAO) -0.0011164385 8.016813e-03
## year -0.0032721415 3.511364e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.041466 -0.001688 0.000085 0.001609 0.053541
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.812e+00 7.793e-01 -2.325 0.021360 *
## PKcal -1.297e+00 4.292e-01 -3.022 0.002949 **
## calperg_food_w_calorie -5.269e-05 2.223e-05 -2.370 0.019026 *
## log(GDP_pcap_thous2015USD_FAO) -9.937e-03 3.003e-03 -3.309 0.001169 **
## year 9.287e-04 3.864e-04 2.403 0.017448 *
## country_nameAustralia 8.225e-02 1.748e-02 4.704 5.65e-06 ***
## country_nameAustria -5.207e-02 2.158e-02 -2.413 0.017005 *
## country_nameBelgium -1.830e-02 2.019e-02 -0.907 0.365981
## country_nameCanada 1.968e-02 1.511e-02 1.302 0.194875
## country_nameCyprus -1.083e-01 2.303e-02 -4.703 5.69e-06 ***
## country_nameCzech Republic -8.606e-02 1.726e-02 -4.986 1.65e-06 ***
## country_nameDenmark -6.540e-02 2.317e-02 -2.823 0.005393 **
## country_nameEstonia -1.361e-01 2.260e-02 -6.019 1.25e-08 ***
## country_nameFinland -8.442e-02 2.307e-02 -3.659 0.000348 ***
## country_nameFrance 2.119e-01 2.070e-02 10.238 < 2e-16 ***
## country_nameGermany 2.419e-01 2.953e-02 8.191 9.54e-14 ***
## country_nameGreece -8.737e-02 1.822e-02 -4.795 3.83e-06 ***
## country_nameIceland -1.036e-01 2.530e-02 -4.093 6.87e-05 ***
## country_nameIreland -7.825e-02 2.330e-02 -3.359 0.000988 ***
## country_nameIsrael -8.167e-02 2.120e-02 -3.852 0.000172 ***
## country_nameItaly 1.125e-01 1.923e-02 5.848 2.91e-08 ***
## country_nameJapan 3.010e-01 3.620e-02 8.314 4.70e-14 ***
## country_nameKorea, Republic of 4.499e-02 1.394e-02 3.228 0.001528 **
## country_nameLuxembourg -9.948e-02 2.688e-02 -3.701 0.000300 ***
## country_nameMalta -1.175e-01 2.319e-02 -5.065 1.16e-06 ***
## country_nameNetherlands 8.238e-04 1.904e-02 0.043 0.965542
## country_nameNew Zealand -5.455e-02 2.293e-02 -2.379 0.018587 *
## country_nameNorway -7.563e-02 2.412e-02 -3.135 0.002058 **
## country_namePortugal -9.201e-02 1.855e-02 -4.960 1.85e-06 ***
## country_nameSlovakia -1.171e-01 1.968e-02 -5.949 1.76e-08 ***
## country_nameSlovenia -1.151e-01 2.228e-02 -5.165 7.40e-07 ***
## country_nameSpain 3.976e-02 1.297e-02 3.065 0.002570 **
## country_nameSweden -7.271e-02 2.173e-02 -3.346 0.001030 **
## country_nameSwitzerland -5.648e-02 2.333e-02 -2.421 0.016660 *
## country_nameUnited Kingdom 1.076e-01 1.983e-02 5.427 2.20e-07 ***
## country_nameUnited States of America 1.621e+00 1.638e-01 9.895 < 2e-16 ***
## country_nameUruguay -1.115e-01 2.076e-02 -5.367 2.91e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.007949 on 153 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9988, Adjusted R-squared: 0.9985
## F-statistic: 3493 on 36 and 153 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.351763e+00 -2.726588e-01
## PKcal -2.144632e+00 -4.488849e-01
## calperg_food_w_calorie -9.661474e-05 -8.772457e-06
## log(GDP_pcap_thous2015USD_FAO) -1.586963e-02 -4.003463e-03
## year 1.652555e-04 1.692152e-03
## country_nameAustralia 4.770676e-02 1.167837e-01
## country_nameAustria -9.469581e-02 -9.438085e-03
## country_nameBelgium -5.818592e-02 2.157757e-02
## country_nameCanada -1.017902e-02 4.952915e-02
## country_nameCyprus -1.538027e-01 -6.280536e-02
## country_nameCzech Republic -1.201580e-01 -5.195827e-02
## country_nameDenmark -1.111634e-01 -1.962815e-02
## country_nameEstonia -1.807073e-01 -9.139756e-02
## country_nameFinland -1.299981e-01 -3.883539e-02
## country_nameFrance 1.709899e-01 2.527641e-01
## country_nameGermany 1.835266e-01 3.001901e-01
## country_nameGreece -1.233724e-01 -5.137287e-02
## country_nameIceland -1.535505e-01 -5.357817e-02
## country_nameIreland -1.242817e-01 -3.222610e-02
## country_nameIsrael -1.235600e-01 -3.978947e-02
## country_nameItaly 7.447211e-02 1.504574e-01
## country_nameJapan 2.294670e-01 3.725171e-01
## country_nameKorea, Republic of 1.745204e-02 7.253028e-02
## country_nameLuxembourg -1.525830e-01 -4.636897e-02
## country_nameMalta -1.632742e-01 -7.164966e-02
## country_nameNetherlands -3.678565e-02 3.843315e-02
## country_nameNew Zealand -9.985426e-02 -9.252956e-03
## country_nameNorway -1.232766e-01 -2.797495e-02
## country_namePortugal -1.286645e-01 -5.536531e-02
## country_nameSlovakia -1.559474e-01 -7.819578e-02
## country_nameSlovenia -1.590884e-01 -7.105320e-02
## country_nameSpain 1.413662e-02 6.538841e-02
## country_nameSweden -1.156298e-01 -2.978332e-02
## country_nameSwitzerland -1.025663e-01 -1.038554e-02
## country_nameUnited Kingdom 6.843442e-02 1.467805e-01
## country_nameUnited States of America 1.297054e+00 1.944181e+00
## country_nameUruguay -1.524753e-01 -7.042966e-02
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.060369 -0.014179 0.000745 0.009480 0.127791
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.281e+00 2.521e+00 0.508 0.61210
## staples -2.886e+00 4.259e-01 -6.775 1.64e-10 ***
## nonstaples_animal 2.476e+00 7.838e-01 3.159 0.00185 **
## nonstaples_other 6.404e+00 5.453e-01 11.744 < 2e-16 ***
## calperg_food_w_calorie 2.733e-05 1.856e-05 1.473 0.14251
## log(GDP_pcap_thous2015USD_FAO) 2.883e-03 1.687e-03 1.709 0.08922 .
## year -6.387e-04 1.252e-03 -0.510 0.61067
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02903 on 183 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9806, Adjusted R-squared: 0.98
## F-statistic: 1543 on 6 and 183 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.693406e+00 6.254520e+00
## staples -3.726030e+00 -2.045382e+00
## nonstaples_animal 9.297494e-01 4.022539e+00
## nonstaples_other 5.328102e+00 7.479919e+00
## calperg_food_w_calorie -9.280402e-06 6.393887e-05
## log(GDP_pcap_thous2015USD_FAO) -4.461724e-04 6.212312e-03
## year -3.109763e-03 1.832307e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.29482 -0.01323 -0.00518 0.00372 0.47772
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.818e+00 2.951e+00 1.294 0.1961
## staples -2.865e+00 9.051e-02 -31.653 <2e-16 ***
## nonstaples_animal 8.576e+00 1.675e-01 51.201 <2e-16 ***
## nonstaples_other 3.072e+00 1.724e-01 17.825 <2e-16 ***
## calperg_food_w_calorie 9.203e-06 8.013e-06 1.149 0.2512
## GDP_pcap_thous2015USD_FAO -3.073e-04 1.348e-04 -2.280 0.0229 *
## year -1.896e-03 1.466e-03 -1.293 0.1963
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06287 on 631 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.9229, Adjusted R-squared: 0.9221
## F-statistic: 1258 on 6 and 631 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.976046e+00 9.612866e+00
## staples -3.042738e+00 -2.687259e+00
## nonstaples_animal 8.247524e+00 8.905395e+00
## nonstaples_other 2.733742e+00 3.410652e+00
## calperg_food_w_calorie -6.532204e-06 2.493918e-05
## GDP_pcap_thous2015USD_FAO -5.718801e-04 -4.264799e-05
## year -4.775543e-03 9.828022e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.060706 -0.013292 0.000503 0.009870 0.129347
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -2.875e+00 4.246e-01 -6.773 1.65e-10 ***
## nonstaples_animal 2.487e+00 7.819e-01 3.181 0.00172 **
## nonstaples_other 6.391e+00 5.436e-01 11.757 < 2e-16 ***
## calperg_food_w_calorie 2.640e-05 1.843e-05 1.433 0.15369
## log(GDP_pcap_thous2015USD_FAO) 2.915e-03 1.683e-03 1.732 0.08493 .
## year -2.556e-06 2.614e-06 -0.978 0.32937
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02897 on 184 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9838, Adjusted R-squared: 0.9832
## F-statistic: 1857 on 6 and 184 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -3.713004e+00 -2.037726e+00
## nonstaples_animal 9.448144e-01 4.030013e+00
## nonstaples_other 5.318326e+00 7.463279e+00
## calperg_food_w_calorie -9.958233e-06 6.275239e-05
## log(GDP_pcap_thous2015USD_FAO) -4.052486e-04 6.234983e-03
## year -7.713771e-06 2.600888e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.092678 -0.004848 0.006645 0.016050 0.164094
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.598e+00 3.837e-02 67.713 <2e-16 ***
## calperg_food_w_calorie -4.260e-05 2.406e-05 -1.771 0.0782 .
## log(GDP_pcap_thous2015USD_FAO) 3.447e-03 2.307e-03 1.494 0.1368
## year 5.933e-05 3.395e-06 17.475 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0398 on 186 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.969, Adjusted R-squared: 0.9683
## F-statistic: 1454 on 4 and 186 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.522196e+00 2.673575e+00
## calperg_food_w_calorie -9.006291e-05 4.854098e-06
## log(GDP_pcap_thous2015USD_FAO) -1.103819e-03 7.998067e-03
## year 5.263264e-05 6.602835e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.080612 -0.019183 0.007472 0.024475 0.155686
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.584e+00 3.562e-02 72.552 < 2e-16 ***
## staples_frac -3.492e-01 6.197e-02 -5.636 6.42e-08 ***
## calperg_food_w_calorie -3.828e-05 2.230e-05 -1.717 0.0877 .
## log(GDP_pcap_thous2015USD_FAO) -3.381e-03 2.457e-03 -1.376 0.1703
## year 1.290e-04 1.276e-05 10.110 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03687 on 185 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9735, Adjusted R-squared: 0.9728
## F-statistic: 1362 on 5 and 185 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.514098e+00 2.654649e+00
## staples_frac -4.715024e-01 -2.269829e-01
## calperg_food_w_calorie -8.226551e-05 5.714472e-06
## log(GDP_pcap_thous2015USD_FAO) -8.227763e-03 1.465025e-03
## year 1.038617e-04 1.542225e-04
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.080164 -0.018785 0.007384 0.024421 0.155270
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.584e+00 3.562e-02 72.551 < 2e-16 ***
## nonstaples_frac 3.494e-01 6.199e-02 5.637 6.38e-08 ***
## calperg_food_w_calorie -3.806e-05 2.230e-05 -1.707 0.0895 .
## log(GDP_pcap_thous2015USD_FAO) -3.394e-03 2.457e-03 -1.381 0.1689
## year -4.452e-05 1.869e-05 -2.382 0.0182 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03687 on 185 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9735, Adjusted R-squared: 0.9728
## F-statistic: 1362 on 5 and 185 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.514030e+00 2.654579e+00
## nonstaples_frac 2.271263e-01 4.717163e-01
## calperg_food_w_calorie -8.205369e-05 5.928660e-06
## log(GDP_pcap_thous2015USD_FAO) -8.241821e-03 1.454455e-03
## year -8.139432e-05 -7.648095e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.062653 -0.010835 0.002728 0.010305 0.128693
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 4.837e+00 2.260e-01 21.401 < 2e-16 ***
## staples_frac -4.138e-01 5.034e-02 -8.219 3.57e-14 ***
## calperg_food_w_calorie 1.641e-05 1.877e-05 0.874 0.383
## log(GDP_pcap_thous2015USD_FAO) 2.814e-03 2.073e-03 1.358 0.176
## year 1.297e-04 1.028e-05 12.609 < 2e-16 ***
## PKcal:staples_frac -7.482e+00 7.446e-01 -10.048 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02971 on 184 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9829, Adjusted R-squared: 0.9824
## F-statistic: 1765 on 6 and 184 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 4.390947e+00 5.282744e+00
## staples_frac -5.131125e-01 -3.144619e-01
## calperg_food_w_calorie -2.062408e-05 5.344948e-05
## log(GDP_pcap_thous2015USD_FAO) -1.275717e-03 6.904700e-03
## year 1.093857e-04 1.499658e-04
## PKcal:staples_frac -8.951110e+00 -6.012838e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.034625 -0.006620 -0.001467 0.005465 0.050854
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 1.496e+01 4.448e+00 3.363 0.00096 ***
## Corn -8.710e-01 6.398e+00 -0.136 0.89188
## Dairy 2.129e+01 2.698e+00 7.888 4.00e-13 ***
## FiberCrop 8.662e+01 1.955e+01 4.430 1.71e-05 ***
## Fruits -2.904e+01 9.420e+00 -3.083 0.00240 **
## Legumes 2.353e+01 1.089e+01 2.161 0.03212 *
## MiscCrop -1.649e+01 1.420e+01 -1.161 0.24743
## NutsSeeds 2.699e+01 1.192e+01 2.264 0.02487 *
## OilCrop -6.807e-01 2.163e+00 -0.315 0.75333
## OilPalm 1.792e+01 7.956e+00 2.253 0.02560 *
## OtherGrain 2.224e+00 5.300e+00 0.420 0.67533
## OtherMeat_Fish 1.872e+01 7.572e+00 2.472 0.01443 *
## Poultry 1.785e+01 6.685e+00 2.670 0.00833 **
## Rice 5.697e+00 1.272e+00 4.480 1.39e-05 ***
## RootTuber 8.271e+00 7.386e+00 1.120 0.26440
## SheepGoat 3.197e+01 1.806e+01 1.770 0.07850 .
## Soybean 3.877e+00 4.055e+00 0.956 0.34044
## SugarCrop -1.146e+01 3.462e+00 -3.309 0.00115 **
## Vegetables -4.748e+01 1.066e+01 -4.452 1.56e-05 ***
## Wheat -2.970e+00 1.854e+00 -1.602 0.11112
## NEC -2.354e+00 3.230e+00 -0.729 0.46720
## Pork 7.140e+00 4.869e+00 1.466 0.14442
## calperg_food_w_calorie 1.491e-05 1.060e-05 1.407 0.16144
## log(GDP_pcap_thous2015USD_FAO) 5.999e-04 1.005e-03 0.597 0.55134
## year 2.031e-06 1.458e-06 1.394 0.16533
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0135 on 165 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9968, Adjusted R-squared: 0.9964
## F-statistic: 2080 on 25 and 165 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef 6.173761e+00 2.373689e+01
## Corn -1.350313e+01 1.176111e+01
## Dairy 1.595841e+01 2.661437e+01
## FiberCrop 4.801295e+01 1.252213e+02
## Fruits -4.764216e+01 -1.044256e+01
## Legumes 2.033672e+00 4.503288e+01
## MiscCrop -4.453463e+01 1.155861e+01
## NutsSeeds 3.452873e+00 5.052390e+01
## OilCrop -4.950506e+00 3.589063e+00
## OilPalm 2.213573e+00 3.363033e+01
## OtherGrain -8.240741e+00 1.268847e+01
## OtherMeat_Fish 3.770906e+00 3.367063e+01
## Poultry 4.653259e+00 3.105314e+01
## Rice 3.185772e+00 8.207721e+00
## RootTuber -6.312029e+00 2.285460e+01
## SheepGoat -3.683714e+00 6.761455e+01
## Soybean -4.129293e+00 1.188246e+01
## SugarCrop -1.829287e+01 -4.620848e+00
## Vegetables -6.853087e+01 -2.642006e+01
## Wheat -6.631241e+00 6.910014e-01
## NEC -8.730586e+00 4.023369e+00
## Pork -2.473280e+00 1.675356e+01
## calperg_food_w_calorie -6.021132e-06 3.584713e-05
## log(GDP_pcap_thous2015USD_FAO) -1.384188e-03 2.583984e-03
## year -8.467050e-07 4.909048e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.099786 -0.007977 0.008765 0.018595 0.147569
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 4.387e-06 6.277e-08 69.887 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 3.873e-03 2.196e-03 1.763 0.079463 .
## year -1.181e-05 3.245e-06 -3.638 0.000355 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03901 on 187 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9701, Adjusted R-squared: 0.9696
## F-statistic: 2019 on 3 and 187 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 4.262676e-06 4.510316e-06
## log(GDP_pcap_thous2015USD_FAO) -4.597439e-04 8.206388e-03
## year -1.820889e-05 -5.404958e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.082275 -0.007548 0.005559 0.013255 0.137765
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 2.422e-06 2.323e-07 10.425 < 2e-16 ***
## Feed_Kt 3.138e-06 3.613e-07 8.687 1.9e-15 ***
## log(GDP_pcap_thous2015USD_FAO) 3.053e-03 1.860e-03 1.641 0.102456
## year -9.634e-06 2.756e-06 -3.496 0.000591 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03299 on 186 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9787, Adjusted R-squared: 0.9782
## F-statistic: 2136 on 4 and 186 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.963551e-06 2.880177e-06
## Feed_Kt 2.425591e-06 3.851092e-06
## log(GDP_pcap_thous2015USD_FAO) -6.168674e-04 6.721906e-03
## year -1.507102e-05 -4.197337e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.075209 -0.008215 0.005013 0.013611 0.147168
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.374e+00 1.287e-01 10.676 < 2e-16 ***
## Feed_Kt 3.291e-06 3.392e-07 9.704 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 3.283e-03 1.844e-03 1.780 0.0767 .
## year 2.854e-05 4.260e-06 6.699 2.41e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0327 on 186 degrees of freedom
## (456 observations deleted due to missingness)
## Multiple R-squared: 0.9791, Adjusted R-squared: 0.9786
## F-statistic: 2176 on 4 and 186 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.120161e+00 1.627989e+00
## Feed_Kt 2.622064e-06 3.960260e-06
## log(GDP_pcap_thous2015USD_FAO) -3.548693e-04 6.920544e-03
## year 2.013470e-05 3.694284e-05
## png
## 2
# select data where food processing energy use is nonzero, and within 2010-2015
comb_data_sel_2 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0)
calc_lin_model_food_en_use_production(comb_data_sel_2, "2")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.76737 -0.02938 -0.02122 -0.00382 0.95912
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.027783 0.002516 11.04 <2e-16 ***
## PKcal 0.611045 0.012713 48.06 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1342 on 3196 degrees of freedom
## Multiple R-squared: 0.4195, Adjusted R-squared: 0.4194
## F-statistic: 2310 on 1 and 3196 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.79600 -0.00203 0.00590 0.02240 0.96323
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 0.65762 0.01222 53.82 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1367 on 3197 degrees of freedom
## Multiple R-squared: 0.4754, Adjusted R-squared: 0.4752
## F-statistic: 2897 on 1 and 3197 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75485 -0.04076 -0.01619 0.01344 0.94816
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.907e-01 1.479e-02 12.90 <2e-16 ***
## PKcal 6.254e-01 1.254e-02 49.87 <2e-16 ***
## calperg_food_w_calorie -8.934e-05 7.994e-06 -11.18 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1317 on 3195 degrees of freedom
## Multiple R-squared: 0.4414, Adjusted R-squared: 0.441
## F-statistic: 1262 on 2 and 3195 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74818 -0.03700 -0.01374 0.01221 0.89978
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.536e-01 1.639e-02 9.371 < 2e-16 ***
## PKcal 6.292e-01 1.270e-02 49.542 < 2e-16 ***
## calperg_food_w_calorie -7.797e-05 8.507e-06 -9.166 < 2e-16 ***
## GDP_pcap_thous2015USD_FAO 1.173e-03 1.447e-04 8.105 7.53e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.133 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.453, Adjusted R-squared: 0.4524
## F-statistic: 842.9 on 3 and 3054 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74074 -0.04289 -0.01320 0.01801 0.88646
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.791e-02 1.745e-02 4.465 8.30e-06 ***
## PKcal 6.448e-01 1.253e-02 51.475 < 2e-16 ***
## calperg_food_w_calorie -5.562e-05 8.571e-06 -6.490 9.97e-11 ***
## log(GDP_pcap_thous2015USD_FAO) 2.622e-02 1.895e-03 13.838 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1304 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.4742, Adjusted R-squared: 0.4737
## F-statistic: 918 on 3 and 3054 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75095 -0.03659 -0.01307 0.01234 0.91251
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.547e-01 1.674e-02 9.237 < 2e-16 ***
## PKcal 6.318e-01 1.264e-02 49.979 < 2e-16 ***
## calperg_food_w_calorie -7.856e-05 8.736e-06 -8.993 < 2e-16 ***
## GDP_pcap_thous2015USD_calc 9.162e-04 1.233e-04 7.429 1.4e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1322 on 3108 degrees of freedom
## (86 observations deleted due to missingness)
## Multiple R-squared: 0.4507, Adjusted R-squared: 0.4502
## F-statistic: 850 on 3 and 3108 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74604 -0.04317 -0.00959 0.01985 0.88317
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.031737 0.004396 -7.219 6.58e-13 ***
## PKcal 0.640238 0.012590 50.852 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.030246 0.001802 16.784 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1312 on 3055 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.4669, Adjusted R-squared: 0.4666
## F-statistic: 1338 on 2 and 3055 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.61885 -0.01597 -0.00933 0.00082 0.70499
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.073e-03 1.766e-03 5.137 2.96e-07 ***
## PKcal 4.376e-01 6.601e-02 6.628 4.00e-11 ***
## PKcal:calperg_food_w_calorie -5.439e-05 3.218e-05 -1.690 0.091 .
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.086e-01 9.333e-03 43.774 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08817 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.7595, Adjusted R-squared: 0.7593
## F-statistic: 3215 on 3 and 3054 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.61907 -0.01854 -0.00907 0.00201 0.70116
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.589e-02 1.238e-02 4.515 6.57e-06 ***
## PKcal 3.482e-01 7.020e-02 4.960 7.42e-07 ***
## calperg_food_w_calorie -2.302e-05 6.141e-06 -3.748 0.000181 ***
## log(GDP_pcap_thous2015USD_FAO) -2.662e-03 1.396e-03 -1.907 0.056677 .
## PKcal:calperg_food_w_calorie -9.956e-06 3.419e-05 -0.291 0.770908
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.179e-01 1.012e-02 41.280 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08799 on 3052 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.7606, Adjusted R-squared: 0.7603
## F-statistic: 1940 on 5 and 3052 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 3.162113e-02 8.016479e-02
## PKcal 2.105764e-01 4.858719e-01
## calperg_food_w_calorie -3.506219e-05 -1.097866e-05
## log(GDP_pcap_thous2015USD_FAO) -5.400611e-03 7.572376e-05
## PKcal:calperg_food_w_calorie -7.698818e-05 5.707659e-05
## PKcal:log(GDP_pcap_thous2015USD_FAO) 3.980452e-01 4.377438e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74231 -0.04273 -0.01257 0.01894 0.88471
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.215e-01 3.732e-01 -0.593 0.553
## PKcal 6.446e-01 1.253e-02 51.447 < 2e-16 ***
## calperg_food_w_calorie -5.471e-05 8.646e-06 -6.328 2.85e-10 ***
## log(GDP_pcap_thous2015USD_FAO) 2.628e-02 1.896e-03 13.858 < 2e-16 ***
## year 1.491e-04 1.856e-04 0.803 0.422
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1304 on 3053 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.4743, Adjusted R-squared: 0.4736
## F-statistic: 688.6 on 4 and 3053 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -9.531226e-01 5.102117e-01
## PKcal 6.200078e-01 6.691394e-01
## calperg_food_w_calorie -7.166481e-05 -3.775961e-05
## log(GDP_pcap_thous2015USD_FAO) 2.255892e-02 2.999473e-02
## year -2.148734e-04 5.130211e-04
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.45406 -0.00743 -0.00032 0.00677 0.51912
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 1.348e-01 2.690e-01
## PKcal 1.227e+00 2.971e-02
## calperg_food_w_calorie -7.018e-06 1.222e-05
## log(GDP_pcap_thous2015USD_FAO) 2.299e-02 4.481e-03
## year -7.574e-05 1.324e-04
## country_nameAlgeria -2.524e-02 2.599e-02
## country_nameArgentina -3.357e-02 2.496e-02
## country_nameArmenia 4.415e-03 2.042e-02
## country_nameAustralia 2.864e-02 2.424e-02
## country_nameAustria -4.704e-02 2.523e-02
## country_nameAzerbaijan 1.692e-03 2.091e-02
## country_nameBangladesh -3.438e-02 7.459e-02
## country_nameBelarus 1.019e-02 2.036e-02
## country_nameBelgium -2.865e-02 2.846e-02
## country_nameBenin 2.646e-02 2.460e-02
## country_nameBosnia and Herzegovina -4.362e-03 2.275e-02
## country_nameBotswana -1.037e-02 2.462e-02
## country_nameBrazil 3.073e-01 2.247e-02
## country_nameBulgaria -4.052e-03 2.266e-02
## country_nameBurkina Faso 2.354e-02 3.354e-02
## country_nameBurundi 4.731e-02 3.533e-02
## country_nameCameroon -4.426e-04 2.830e-02
## country_nameCanada -5.725e-02 2.611e-02
## country_nameCape Verde 4.953e-03 3.235e-02
## country_nameCentral African Republic 4.367e-02 3.272e-02
## country_nameChad 2.850e-02 3.539e-02
## country_nameChile -2.280e-02 2.537e-02
## country_nameChina -6.471e-01 4.386e-02
## country_nameColombia -6.881e-04 2.095e-02
## country_nameComoros 2.705e-02 3.427e-02
## country_nameCongo 5.288e-03 3.920e-02
## country_nameCosta Rica -8.793e-03 2.210e-02
## country_nameCote dIvoire 3.012e-03 2.079e-02
## country_nameCroatia -1.890e-02 2.234e-02
## country_nameCyprus -4.176e-02 2.347e-02
## country_nameCzech Republic -2.178e-02 2.290e-02
## country_nameDenmark -3.584e-02 2.476e-02
## country_nameDjibouti 1.686e-02 3.437e-02
## country_nameDominican Republic 8.791e-03 2.077e-02
## country_nameEstonia -1.650e-02 2.112e-02
## country_nameFinland -4.279e-02 2.344e-02
## country_nameFrance 8.845e-03 2.451e-02
## country_nameGabon -2.081e-02 2.282e-02
## country_nameGambia 4.406e-02 3.658e-02
## country_nameGeorgia 2.467e-03 2.155e-02
## country_nameGermany 3.984e-02 2.361e-02
## country_nameGreece -4.017e-02 2.219e-02
## country_nameGuinea 2.587e-02 3.273e-02
## country_nameGuinea-Bissau 4.418e-02 3.386e-02
## country_nameHong Kong -3.388e-02 3.022e-02
## country_nameHungary -9.581e-03 2.242e-02
## country_nameIceland -5.468e-02 2.482e-02
## country_nameIndia -1.065e+00 3.812e-02
## country_nameIndonesia -2.672e-01 2.762e-02
## country_nameIreland -3.892e-02 2.352e-02
## country_nameIsrael -5.604e-02 2.447e-02
## country_nameItaly -5.382e-02 2.389e-02
## country_nameJamaica -1.025e-02 3.357e-02
## country_nameJapan -1.469e-02 2.393e-02
## country_nameKazakhstan 5.369e-04 2.128e-02
## country_nameKenya -1.515e-03 2.084e-02
## country_nameKorea, Republic of -4.249e-02 2.243e-02
## country_nameKyrgyzstan 1.278e-02 2.125e-02
## country_nameLatvia -1.244e-02 2.096e-02
## country_nameLesotho 2.952e-02 3.325e-02
## country_nameLiberia 4.291e-02 3.321e-02
## country_nameLithuania -9.702e-03 2.082e-02
## country_nameLuxembourg -7.868e-02 2.951e-02
## country_nameMacedonia, the former Yugoslav Republic of -5.188e-03 2.159e-02
## country_nameMadagascar 2.777e-02 3.316e-02
## country_nameMalawi 3.316e-02 3.306e-02
## country_nameMali 2.011e-02 3.269e-02
## country_nameMalta -4.274e-02 3.480e-02
## country_nameMauritania 2.234e-02 3.495e-02
## country_nameMexico -6.557e-02 2.316e-02
## country_nameMoldova, Republic of 1.465e-02 2.064e-02
## country_nameMontenegro -1.385e-02 2.820e-02
## country_nameMorocco -1.588e-02 2.299e-02
## country_nameMozambique 2.062e-02 4.012e-02
## country_nameMyanmar -2.599e-02 4.020e-02
## country_nameNetherlands 7.556e-04 2.374e-02
## country_nameNew Zealand -3.467e-02 2.484e-02
## country_nameNorway -5.536e-02 2.508e-02
## country_namePhilippines -2.097e-02 2.270e-02
## country_namePoland 1.509e-02 2.144e-02
## country_namePortugal -3.211e-02 2.187e-02
## country_nameRomania -2.100e-02 2.150e-02
## country_nameRussian Federation 2.583e-01 2.161e-02
## country_nameRwanda 2.493e-02 3.231e-02
## country_nameSao Tome and Principe 2.147e-02 3.214e-02
## country_nameSenegal 1.934e-02 2.858e-02
## country_nameSerbia -4.098e-04 2.821e-02
## country_nameSeychelles -2.555e-02 3.640e-02
## country_nameSierra Leone 3.663e-02 3.329e-02
## country_nameSlovakia -2.426e-02 2.367e-02
## country_nameSlovenia -3.064e-02 2.300e-02
## country_nameSouth Africa -5.020e-02 2.455e-02
## country_nameSpain -2.284e-02 2.236e-02
## country_nameSudan -1.588e-02 2.639e-02
## country_nameSwaziland 1.099e-03 3.222e-02
## country_nameSweden -4.899e-02 2.384e-02
## country_nameSwitzerland -7.181e-02 2.616e-02
## country_nameTajikistan 1.865e-02 2.139e-02
## country_nameTanzania, United Republic of 2.075e-02 3.091e-02
## country_nameThailand 9.765e-02 2.229e-02
## country_nameTogo 3.992e-02 2.855e-02
## country_nameTunisia -4.026e-03 2.158e-02
## country_nameTurkey -7.690e-02 2.098e-02
## country_nameTurkmenistan 1.344e-02 2.519e-02
## country_nameUganda 3.714e-04 3.218e-02
## country_nameUkraine 2.191e-02 2.060e-02
## country_nameUnited Kingdom 8.223e-04 2.365e-02
## country_nameUnited States of America 1.610e-01 2.634e-02
## country_nameUruguay -2.820e-02 4.506e-02
## country_nameUzbekistan -2.499e-03 2.486e-02
## country_nameVenezuela -4.158e-02 2.454e-02
## country_nameViet Nam -6.104e-03 3.424e-02
## country_nameZambia 2.586e-02 2.845e-02
## country_nameZimbabwe 2.789e-02 2.754e-02
## t value Pr(>|t|)
## (Intercept) 0.501 0.616297
## PKcal 41.308 < 2e-16 ***
## calperg_food_w_calorie -0.574 0.565856
## log(GDP_pcap_thous2015USD_FAO) 5.131 3.06e-07 ***
## year -0.572 0.567421
## country_nameAlgeria -0.971 0.331645
## country_nameArgentina -1.345 0.178709
## country_nameArmenia 0.216 0.828882
## country_nameAustralia 1.181 0.237652
## country_nameAustria -1.864 0.062421 .
## country_nameAzerbaijan 0.081 0.935541
## country_nameBangladesh -0.461 0.644889
## country_nameBelarus 0.500 0.616881
## country_nameBelgium -1.007 0.314198
## country_nameBenin 1.075 0.282294
## country_nameBosnia and Herzegovina -0.192 0.847954
## country_nameBotswana -0.421 0.673622
## country_nameBrazil 13.677 < 2e-16 ***
## country_nameBulgaria -0.179 0.858085
## country_nameBurkina Faso 0.702 0.482830
## country_nameBurundi 1.339 0.180699
## country_nameCameroon -0.016 0.987522
## country_nameCanada -2.193 0.028405 *
## country_nameCape Verde 0.153 0.878318
## country_nameCentral African Republic 1.335 0.182097
## country_nameChad 0.805 0.420657
## country_nameChile -0.899 0.368920
## country_nameChina -14.753 < 2e-16 ***
## country_nameColombia -0.033 0.973799
## country_nameComoros 0.789 0.429972
## country_nameCongo 0.135 0.892699
## country_nameCosta Rica -0.398 0.690704
## country_nameCote dIvoire 0.145 0.884800
## country_nameCroatia -0.846 0.397635
## country_nameCyprus -1.780 0.075208 .
## country_nameCzech Republic -0.951 0.341673
## country_nameDenmark -1.448 0.147810
## country_nameDjibouti 0.490 0.623867
## country_nameDominican Republic 0.423 0.672166
## country_nameEstonia -0.781 0.434608
## country_nameFinland -1.826 0.068009 .
## country_nameFrance 0.361 0.718260
## country_nameGabon -0.912 0.361761
## country_nameGambia 1.205 0.228458
## country_nameGeorgia 0.114 0.908882
## country_nameGermany 1.688 0.091563 .
## country_nameGreece -1.810 0.070328 .
## country_nameGuinea 0.790 0.429420
## country_nameGuinea-Bissau 1.305 0.192090
## country_nameHong Kong -1.121 0.262292
## country_nameHungary -0.427 0.669098
## country_nameIceland -2.203 0.027646 *
## country_nameIndia -27.927 < 2e-16 ***
## country_nameIndonesia -9.673 < 2e-16 ***
## country_nameIreland -1.655 0.098078 .
## country_nameIsrael -2.290 0.022093 *
## country_nameItaly -2.253 0.024334 *
## country_nameJamaica -0.305 0.760098
## country_nameJapan -0.614 0.539256
## country_nameKazakhstan 0.025 0.979871
## country_nameKenya -0.073 0.942052
## country_nameKorea, Republic of -1.894 0.058258 .
## country_nameKyrgyzstan 0.601 0.547593
## country_nameLatvia -0.594 0.552851
## country_nameLesotho 0.888 0.374657
## country_nameLiberia 1.292 0.196454
## country_nameLithuania -0.466 0.641244
## country_nameLuxembourg -2.666 0.007721 **
## country_nameMacedonia, the former Yugoslav Republic of -0.240 0.810092
## country_nameMadagascar 0.837 0.402395
## country_nameMalawi 1.003 0.315891
## country_nameMali 0.615 0.538554
## country_nameMalta -1.228 0.219532
## country_nameMauritania 0.639 0.522767
## country_nameMexico -2.832 0.004664 **
## country_nameMoldova, Republic of 0.710 0.477815
## country_nameMontenegro -0.491 0.623453
## country_nameMorocco -0.691 0.489786
## country_nameMozambique 0.514 0.607267
## country_nameMyanmar -0.647 0.517965
## country_nameNetherlands 0.032 0.974608
## country_nameNew Zealand -1.396 0.162867
## country_nameNorway -2.207 0.027366 *
## country_namePhilippines -0.924 0.355717
## country_namePoland 0.704 0.481571
## country_namePortugal -1.469 0.142068
## country_nameRomania -0.977 0.328721
## country_nameRussian Federation 11.955 < 2e-16 ***
## country_nameRwanda 0.771 0.440486
## country_nameSao Tome and Principe 0.668 0.504151
## country_nameSenegal 0.677 0.498701
## country_nameSerbia -0.015 0.988412
## country_nameSeychelles -0.702 0.482835
## country_nameSierra Leone 1.100 0.271214
## country_nameSlovakia -1.025 0.305461
## country_nameSlovenia -1.332 0.182940
## country_nameSouth Africa -2.045 0.040943 *
## country_nameSpain -1.022 0.306977
## country_nameSudan -0.602 0.547429
## country_nameSwaziland 0.034 0.972791
## country_nameSweden -2.055 0.039956 *
## country_nameSwitzerland -2.745 0.006079 **
## country_nameTajikistan 0.872 0.383320
## country_nameTanzania, United Republic of 0.671 0.502134
## country_nameThailand 4.381 1.23e-05 ***
## country_nameTogo 1.398 0.162181
## country_nameTunisia -0.187 0.851991
## country_nameTurkey -3.665 0.000252 ***
## country_nameTurkmenistan 0.533 0.593772
## country_nameUganda 0.012 0.990790
## country_nameUkraine 1.064 0.287643
## country_nameUnited Kingdom 0.035 0.972271
## country_nameUnited States of America 6.112 1.11e-09 ***
## country_nameUruguay -0.626 0.531498
## country_nameUzbekistan -0.101 0.919936
## country_nameVenezuela -1.695 0.090267 .
## country_nameViet Nam -0.178 0.858511
## country_nameZambia 0.909 0.363471
## country_nameZimbabwe 1.013 0.311352
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0701 on 2939 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.8537, Adjusted R-squared: 0.8478
## F-statistic: 145.3 on 118 and 2939 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -3.926392e-01
## PKcal 1.169148e+00
## calperg_food_w_calorie -3.098069e-05
## log(GDP_pcap_thous2015USD_FAO) 1.420709e-02
## year -3.354170e-04
## country_nameAlgeria -7.620964e-02
## country_nameArgentina -8.249942e-02
## country_nameArmenia -3.563334e-02
## country_nameAustralia -1.890242e-02
## country_nameAustria -9.651649e-02
## country_nameAzerbaijan -3.931595e-02
## country_nameBangladesh -1.806430e-01
## country_nameBelarus -2.974141e-02
## country_nameBelgium -8.445889e-02
## country_nameBenin -2.178316e-02
## country_nameBosnia and Herzegovina -4.896546e-02
## country_nameBotswana -5.864630e-02
## country_nameBrazil 2.632185e-01
## country_nameBulgaria -4.848103e-02
## country_nameBurkina Faso -4.222504e-02
## country_nameBurundi -2.197270e-02
## country_nameCameroon -5.593010e-02
## country_nameCanada -1.084410e-01
## country_nameCape Verde -5.847638e-02
## country_nameCentral African Republic -2.048744e-02
## country_nameChad -4.088555e-02
## country_nameChile -7.255609e-02
## country_nameChina -7.331098e-01
## country_nameColombia -4.176303e-02
## country_nameComoros -4.014923e-02
## country_nameCongo -7.157554e-02
## country_nameCosta Rica -5.211727e-02
## country_nameCote dIvoire -3.775140e-02
## country_nameCroatia -6.270657e-02
## country_nameCyprus -8.777442e-02
## country_nameCzech Republic -6.667516e-02
## country_nameDenmark -8.437768e-02
## country_nameDjibouti -5.053874e-02
## country_nameDominican Republic -3.193673e-02
## country_nameEstonia -5.790342e-02
## country_nameFinland -8.874015e-02
## country_nameFrance -3.921956e-02
## country_nameGabon -6.555024e-02
## country_nameGambia -2.766158e-02
## country_nameGeorgia -3.978789e-02
## country_nameGermany -6.445172e-03
## country_nameGreece -8.368062e-02
## country_nameGuinea -3.831543e-02
## country_nameGuinea-Bissau -2.221483e-02
## country_nameHong Kong -9.313382e-02
## country_nameHungary -5.353248e-02
## country_nameIceland -1.033352e-01
## country_nameIndia -1.139259e+00
## country_nameIndonesia -3.213700e-01
## country_nameIreland -8.503908e-02
## country_nameIsrael -1.040299e-01
## country_nameItaly -1.006540e-01
## country_nameJamaica -7.606520e-02
## country_nameJapan -6.160588e-02
## country_nameKazakhstan -4.118221e-02
## country_nameKenya -4.236833e-02
## country_nameKorea, Republic of -8.645918e-02
## country_nameKyrgyzstan -2.888507e-02
## country_nameLatvia -5.354610e-02
## country_nameLesotho -3.567265e-02
## country_nameLiberia -2.220870e-02
## country_nameLithuania -5.052581e-02
## country_nameLuxembourg -1.365455e-01
## country_nameMacedonia, the former Yugoslav Republic of -4.751972e-02
## country_nameMadagascar -3.724634e-02
## country_nameMalawi -3.165901e-02
## country_nameMali -4.398870e-02
## country_nameMalta -1.109742e-01
## country_nameMauritania -4.618441e-02
## country_nameMexico -1.109680e-01
## country_nameMoldova, Republic of -2.582004e-02
## country_nameMontenegro -6.914996e-02
## country_nameMorocco -6.096607e-02
## country_nameMozambique -5.804541e-02
## country_nameMyanmar -1.048121e-01
## country_nameNetherlands -4.578709e-02
## country_nameNew Zealand -8.336218e-02
## country_nameNorway -1.045270e-01
## country_namePhilippines -6.548046e-02
## country_namePoland -2.694801e-02
## country_namePortugal -7.498529e-02
## country_nameRomania -6.316440e-02
## country_nameRussian Federation 2.159361e-01
## country_nameRwanda -3.843129e-02
## country_nameSao Tome and Principe -4.154924e-02
## country_nameSenegal -3.670696e-02
## country_nameSerbia -5.573169e-02
## country_nameSeychelles -9.693148e-02
## country_nameSierra Leone -2.863673e-02
## country_nameSlovakia -7.067576e-02
## country_nameSlovenia -7.574229e-02
## country_nameSouth Africa -9.833466e-02
## country_nameSpain -6.667571e-02
## country_nameSudan -6.761328e-02
## country_nameSwaziland -6.207412e-02
## country_nameSweden -9.572687e-02
## country_nameSwitzerland -1.231021e-01
## country_nameTajikistan -2.329517e-02
## country_nameTanzania, United Republic of -3.985915e-02
## country_nameThailand 5.393820e-02
## country_nameTogo -1.606471e-02
## country_nameTunisia -4.633282e-02
## country_nameTurkey -1.180434e-01
## country_nameTurkmenistan -3.594925e-02
## country_nameUganda -6.271971e-02
## country_nameUkraine -1.848776e-02
## country_nameUnited Kingdom -4.555684e-02
## country_nameUnited States of America 1.093369e-01
## country_nameUruguay -1.165389e-01
## country_nameUzbekistan -5.125259e-02
## country_nameVenezuela -8.968905e-02
## country_nameViet Nam -7.323511e-02
## country_nameZambia -2.992231e-02
## country_nameZimbabwe -2.611534e-02
## 97.5 %
## (Intercept) 6.622645e-01
## PKcal 1.285673e+00
## calperg_food_w_calorie 1.694515e-05
## log(GDP_pcap_thous2015USD_FAO) 3.177859e-02
## year 1.839329e-04
## country_nameAlgeria 2.572969e-02
## country_nameArgentina 1.536546e-02
## country_nameArmenia 4.446314e-02
## country_nameAustralia 7.617392e-02
## country_nameAustria 2.441929e-03
## country_nameAzerbaijan 4.269910e-02
## country_nameBangladesh 1.118793e-01
## country_nameBelarus 5.011942e-02
## country_nameBelgium 2.715717e-02
## country_nameBenin 7.469780e-02
## country_nameBosnia and Herzegovina 4.024178e-02
## country_nameBotswana 3.790464e-02
## country_nameBrazil 3.513231e-01
## country_nameBulgaria 4.037691e-02
## country_nameBurkina Faso 8.930579e-02
## country_nameBurundi 1.165934e-01
## country_nameCameroon 5.504488e-02
## country_nameCanada -6.055960e-03
## country_nameCape Verde 6.838273e-02
## country_nameCentral African Republic 1.078283e-01
## country_nameChad 9.788696e-02
## country_nameChile 2.695119e-02
## country_nameChina -5.610972e-01
## country_nameColombia 4.038686e-02
## country_nameComoros 9.425725e-02
## country_nameCongo 8.215207e-02
## country_nameCosta Rica 3.453181e-02
## country_nameCote dIvoire 4.377621e-02
## country_nameCroatia 2.490606e-02
## country_nameCyprus 4.245973e-03
## country_nameCzech Republic 2.312164e-02
## country_nameDenmark 1.270151e-02
## country_nameDjibouti 8.425291e-02
## country_nameDominican Republic 4.951828e-02
## country_nameEstonia 2.490234e-02
## country_nameFinland 3.167420e-03
## country_nameFrance 5.690908e-02
## country_nameGabon 2.392575e-02
## country_nameGambia 1.157913e-01
## country_nameGeorgia 4.472103e-02
## country_nameGermany 8.613486e-02
## country_nameGreece 3.335445e-03
## country_nameGuinea 9.005583e-02
## country_nameGuinea-Bissau 1.105746e-01
## country_nameHong Kong 2.537068e-02
## country_nameHungary 3.437050e-02
## country_nameIceland -6.020164e-03
## country_nameIndia -9.897784e-01
## country_nameIndonesia -2.130390e-01
## country_nameIreland 7.197253e-03
## country_nameIsrael -8.056735e-03
## country_nameItaly -6.979883e-03
## country_nameJamaica 5.556450e-02
## country_nameJapan 3.222349e-02
## country_nameKazakhstan 4.225599e-02
## country_nameKenya 3.933899e-02
## country_nameKorea, Republic of 1.486405e-03
## country_nameKyrgyzstan 5.444569e-02
## country_nameLatvia 2.866063e-02
## country_nameLesotho 9.471970e-02
## country_nameLiberia 1.080211e-01
## country_nameLithuania 3.112111e-02
## country_nameLuxembourg -2.080967e-02
## country_nameMacedonia, the former Yugoslav Republic of 3.714278e-02
## country_nameMadagascar 9.278417e-02
## country_nameMalawi 9.798191e-02
## country_nameMali 8.420027e-02
## country_nameMalta 2.550007e-02
## country_nameMauritania 9.085621e-02
## country_nameMexico -2.016256e-02
## country_nameMoldova, Republic of 5.512777e-02
## country_nameMontenegro 4.145292e-02
## country_nameMorocco 2.920193e-02
## country_nameMozambique 9.929316e-02
## country_nameMyanmar 5.282972e-02
## country_nameNetherlands 4.729826e-02
## country_nameNew Zealand 1.403006e-02
## country_nameNorway -6.183894e-03
## country_namePhilippines 2.354251e-02
## country_namePoland 5.712984e-02
## country_namePortugal 1.076343e-02
## country_nameRomania 2.115603e-02
## country_nameRussian Federation 3.006613e-01
## country_nameRwanda 8.829095e-02
## country_nameSao Tome and Principe 8.449323e-02
## country_nameSenegal 7.538876e-02
## country_nameSerbia 5.491208e-02
## country_nameSeychelles 4.583101e-02
## country_nameSierra Leone 1.019005e-01
## country_nameSlovakia 2.215140e-02
## country_nameSlovenia 1.446139e-02
## country_nameSouth Africa -2.067898e-03
## country_nameSpain 2.099188e-02
## country_nameSudan 3.586091e-02
## country_nameSwaziland 6.427214e-02
## country_nameSweden -2.248844e-03
## country_nameSwitzerland -2.052562e-02
## country_nameTajikistan 6.060379e-02
## country_nameTanzania, United Republic of 8.135287e-02
## country_nameThailand 1.413523e-01
## country_nameTogo 9.590339e-02
## country_nameTunisia 3.828065e-02
## country_nameTurkey -3.576115e-02
## country_nameTurkmenistan 6.281979e-02
## country_nameUganda 6.346259e-02
## country_nameUkraine 6.231337e-02
## country_nameUnited Kingdom 4.720138e-02
## country_nameUnited States of America 2.126248e-01
## country_nameUruguay 6.014798e-02
## country_nameUzbekistan 4.625373e-02
## country_nameVenezuela 6.532170e-03
## country_nameViet Nam 6.102713e-02
## country_nameZambia 8.163404e-02
## country_nameZimbabwe 8.189093e-02
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.52762 -0.01605 -0.00869 0.00110 0.70952
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.923e-01 2.521e-01 -1.556 0.1199
## staples -2.862e-01 2.647e-02 -10.811 <2e-16 ***
## nonstaples_animal 5.912e+00 1.066e-01 55.464 <2e-16 ***
## nonstaples_other -1.891e-01 1.013e-01 -1.867 0.0620 .
## calperg_food_w_calorie -5.765e-06 5.859e-06 -0.984 0.3252
## log(GDP_pcap_thous2015USD_FAO) -2.286e-03 1.356e-03 -1.685 0.0920 .
## year 2.074e-04 1.254e-04 1.654 0.0982 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08733 on 3051 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.7643, Adjusted R-squared: 0.7638
## F-statistic: 1649 on 6 and 3051 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -8.866628e-01 1.021094e-01
## staples -3.380856e-01 -2.342820e-01
## nonstaples_animal 5.702826e+00 6.120807e+00
## nonstaples_other -3.876286e-01 9.467398e-03
## calperg_food_w_calorie -1.725177e-05 5.722351e-06
## log(GDP_pcap_thous2015USD_FAO) -4.944909e-03 3.735279e-04
## year -3.843465e-05 4.532660e-04
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.52511 -0.01608 -0.00918 0.00167 0.70665
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.685e-01 2.522e-01 -1.858 0.06328 .
## staples -2.862e-01 2.581e-02 -11.087 < 2e-16 ***
## nonstaples_animal 5.911e+00 1.048e-01 56.387 < 2e-16 ***
## nonstaples_other -1.855e-01 1.012e-01 -1.833 0.06695 .
## calperg_food_w_calorie -5.797e-06 5.737e-06 -1.011 0.31234
## GDP_pcap_thous2015USD_FAO -2.578e-04 9.814e-05 -2.627 0.00866 **
## year 2.453e-04 1.257e-04 1.952 0.05108 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08727 on 3051 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.7646, Adjusted R-squared: 0.7641
## F-statistic: 1652 on 6 and 3051 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -9.628842e-01 2.593674e-02
## staples -3.368057e-01 -2.355785e-01
## nonstaples_animal 5.705225e+00 6.116294e+00
## nonstaples_other -3.839281e-01 1.296601e-02
## calperg_food_w_calorie -1.704490e-05 5.451171e-06
## GDP_pcap_thous2015USD_FAO -4.502237e-04 -6.536275e-05
## year -1.147364e-06 4.916574e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.52888 -0.01555 -0.00810 0.00064 0.71146
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -2.898e-01 2.638e-02 -10.986 <2e-16 ***
## nonstaples_animal 5.898e+00 1.062e-01 55.519 <2e-16 ***
## nonstaples_other -1.682e-01 1.004e-01 -1.675 0.0940 .
## calperg_food_w_calorie -7.430e-06 5.761e-06 -1.290 0.1973
## log(GDP_pcap_thous2015USD_FAO) -2.420e-03 1.354e-03 -1.788 0.0739 .
## year 1.255e-05 5.836e-06 2.151 0.0315 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08735 on 3052 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.7953, Adjusted R-squared: 0.7949
## F-statistic: 1976 on 6 and 3052 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -3.414902e-01 -2.380577e-01
## nonstaples_animal 5.689516e+00 6.106101e+00
## nonstaples_other -3.650182e-01 2.865908e-02
## calperg_food_w_calorie -1.872621e-05 3.866528e-06
## log(GDP_pcap_thous2015USD_FAO) -5.074739e-03 2.340951e-04
## year 1.112071e-06 2.399594e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74113 -0.04265 -0.01304 0.01818 0.88604
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 6.447e-01 1.253e-02 51.472 < 2e-16 ***
## calperg_food_w_calorie -5.562e-05 8.510e-06 -6.535 7.41e-11 ***
## log(GDP_pcap_thous2015USD_FAO) 2.621e-02 1.892e-03 13.849 < 2e-16 ***
## year 3.904e-05 8.679e-06 4.498 7.12e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1304 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.5436, Adjusted R-squared: 0.543
## F-statistic: 909.5 on 4 and 3054 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 6.201483e-01 6.692667e-01
## calperg_food_w_calorie -7.230175e-05 -3.893012e-05
## log(GDP_pcap_thous2015USD_FAO) 2.249586e-02 2.991614e-02
## year 2.201953e-05 5.605568e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74230 -0.04282 -0.01259 0.01816 0.88548
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 6.458e-01 1.265e-02 51.051 < 2e-16 ***
## staples_frac -1.779e-02 2.804e-02 -0.634 0.526
## calperg_food_w_calorie -5.422e-05 8.793e-06 -6.166 7.92e-10 ***
## log(GDP_pcap_thous2015USD_FAO) 2.458e-02 3.190e-03 7.705 1.75e-14 ***
## year 4.338e-05 1.105e-05 3.924 8.89e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1304 on 3053 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.5437, Adjusted R-squared: 0.543
## F-statistic: 727.6 on 5 and 3053 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 6.210235e-01 6.706328e-01
## staples_frac -7.276056e-02 3.718944e-02
## calperg_food_w_calorie -7.145518e-05 -3.697525e-05
## log(GDP_pcap_thous2015USD_FAO) 1.832331e-02 3.083127e-02
## year 2.170499e-05 6.505383e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74212 -0.04288 -0.01263 0.01813 0.88562
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 6.458e-01 1.265e-02 51.038 < 2e-16 ***
## nonstaples_frac 1.645e-02 2.797e-02 0.588 0.55640
## calperg_food_w_calorie -5.439e-05 8.763e-06 -6.206 6.16e-10 ***
## log(GDP_pcap_thous2015USD_FAO) 2.469e-02 3.192e-03 7.737 1.37e-14 ***
## year 3.488e-05 1.120e-05 3.116 0.00185 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1304 on 3053 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.5437, Adjusted R-squared: 0.5429
## F-statistic: 727.5 on 5 and 3053 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 6.209457e-01 6.705624e-01
## nonstaples_frac -3.838487e-02 7.128896e-02
## calperg_food_w_calorie -7.157006e-05 -3.720469e-05
## log(GDP_pcap_thous2015USD_FAO) 1.843621e-02 3.095209e-02
## year 1.292951e-05 5.682893e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.98586 -0.02099 -0.00790 0.00772 0.62895
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.780e+00 4.793e-02 57.999 < 2e-16 ***
## staples_frac 9.471e-02 2.179e-02 4.346 1.43e-05 ***
## calperg_food_w_calorie -3.455e-05 6.803e-06 -5.078 4.04e-07 ***
## log(GDP_pcap_thous2015USD_FAO) 1.158e-02 2.479e-03 4.672 3.12e-06 ***
## year 2.446e-06 8.583e-06 0.285 0.776
## PKcal:staples_frac -3.374e+00 7.419e-02 -45.479 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1007 on 3052 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.728, Adjusted R-squared: 0.7275
## F-statistic: 1362 on 6 and 3052 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.685886e+00 2.873843e+00
## staples_frac 5.198340e-02 1.374363e-01
## calperg_food_w_calorie -4.788647e-05 -2.120800e-05
## log(GDP_pcap_thous2015USD_FAO) 6.721790e-03 1.644489e-02
## year -1.438297e-05 1.927547e-05
## PKcal:staples_frac -3.519533e+00 -3.228598e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141096 -0.008143 -0.002257 0.007234 0.206771
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 6.727e-01 2.924e+00 0.230 0.81811
## Corn -7.687e+00 5.679e-01 -13.535 < 2e-16 ***
## Dairy -6.409e+00 1.647e+00 -3.892 0.00011 ***
## FiberCrop 9.426e+01 8.855e+00 10.645 < 2e-16 ***
## Fruits -5.256e+00 2.500e+00 -2.103 0.03589 *
## Legumes 3.638e+00 3.012e+00 1.208 0.22745
## MiscCrop 1.013e+01 1.079e+01 0.939 0.34819
## NutsSeeds -3.612e+00 3.486e+00 -1.036 0.30055
## OilCrop -4.527e+00 1.371e+00 -3.302 0.00102 **
## OilPalm -4.674e+00 2.774e+00 -1.685 0.09255 .
## OtherGrain -9.325e+00 1.074e+00 -8.685 < 2e-16 ***
## OtherMeat_Fish 7.521e+00 3.538e+00 2.126 0.03391 *
## Poultry 2.144e+01 3.259e+00 6.579 1.02e-10 ***
## Rice -1.618e+00 3.102e-01 -5.215 2.52e-07 ***
## RootTuber 4.674e+00 9.629e-01 4.854 1.54e-06 ***
## SheepGoat 4.689e+01 1.417e+01 3.309 0.00099 ***
## Soybean 1.016e+01 1.231e+00 8.251 9.61e-16 ***
## SugarCrop 1.365e+01 1.489e+00 9.169 < 2e-16 ***
## Vegetables -2.620e+01 2.839e+00 -9.228 < 2e-16 ***
## Wheat 8.244e-02 4.632e-01 0.178 0.85881
## NEC 2.204e+00 1.308e+00 1.686 0.09237 .
## Pork 1.426e+01 1.167e+00 12.217 < 2e-16 ***
## calperg_food_w_calorie -4.279e-06 4.716e-06 -0.907 0.36458
## log(GDP_pcap_thous2015USD_FAO) -7.551e-04 1.071e-03 -0.705 0.48121
## year 5.997e-06 4.629e-06 1.296 0.19561
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0304 on 613 degrees of freedom
## (2560 observations deleted due to missingness)
## Multiple R-squared: 0.9839, Adjusted R-squared: 0.9833
## F-statistic: 1501 on 25 and 613 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -5.069240e+00 6.414665e+00
## Corn -8.802175e+00 -6.571546e+00
## Dairy -9.642807e+00 -3.174973e+00
## FiberCrop 7.687215e+01 1.116517e+02
## Fruits -1.016451e+01 -3.472298e-01
## Legumes -2.275770e+00 9.552638e+00
## MiscCrop -1.106489e+01 3.133381e+01
## NutsSeeds -1.045790e+01 3.233990e+00
## OilCrop -7.219411e+00 -1.834146e+00
## OilPalm -1.012240e+01 7.743912e-01
## OtherGrain -1.143378e+01 -7.216666e+00
## OtherMeat_Fish 5.733957e-01 1.446814e+01
## Poultry 1.504270e+01 2.784490e+01
## Rice -2.226977e+00 -1.008575e+00
## RootTuber 2.782815e+00 6.564736e+00
## SheepGoat 1.906423e+01 7.471705e+01
## Soybean 7.740069e+00 1.257525e+01
## SugarCrop 1.072917e+01 1.657759e+01
## Vegetables -3.177002e+01 -2.062057e+01
## Wheat -8.272584e-01 9.921336e-01
## NEC -3.637764e-01 4.772280e+00
## Pork 1.197024e+01 1.655566e+01
## calperg_food_w_calorie -1.353990e-05 4.982245e-06
## log(GDP_pcap_thous2015USD_FAO) -2.859011e-03 1.348885e-03
## year -3.093110e-06 1.508629e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74558 -0.03957 -0.00994 0.01799 0.86360
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.237e-06 2.030e-08 60.962 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.727e-02 1.636e-03 16.669 < 2e-16 ***
## year -1.379e-05 1.985e-06 -6.949 4.49e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1198 on 3055 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.6146, Adjusted R-squared: 0.6142
## F-statistic: 1624 on 3 and 3055 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.197620e-06 1.277218e-06
## log(GDP_pcap_thous2015USD_FAO) 2.406436e-02 3.048018e-02
## year -1.768273e-05 -9.899729e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65799 -0.01476 -0.00234 0.00884 0.69188
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -3.599e-08 2.594e-08 -1.387 0.165434
## Feed_Kt 4.697e-06 8.063e-08 58.258 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 6.990e-03 1.179e-03 5.930 3.37e-09 ***
## year -4.817e-06 1.375e-06 -3.504 0.000465 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08245 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.8175, Adjusted R-squared: 0.8172
## F-statistic: 3419 on 4 and 3054 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -8.685602e-08 1.487469e-08
## Feed_Kt 4.539075e-06 4.855252e-06
## log(GDP_pcap_thous2015USD_FAO) 4.678706e-03 9.301086e-03
## year -7.513011e-06 -2.121836e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68593 -0.01267 -0.00260 0.00571 0.69013
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -9.110e-02 1.315e-02 -6.927 5.21e-12 ***
## Feed_Kt 5.004e-06 7.220e-08 69.313 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 4.767e-03 1.182e-03 4.033 5.65e-05 ***
## year -2.439e-06 1.387e-06 -1.759 0.0788 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08184 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.8202, Adjusted R-squared: 0.8199
## F-statistic: 3482 on 4 and 3054 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -1.168844e-01 -6.531389e-02
## Feed_Kt 4.862583e-06 5.145699e-06
## log(GDP_pcap_thous2015USD_FAO) 2.449314e-03 7.084938e-03
## year -5.157952e-06 2.804550e-07
## png
## 2
plot_ly(comb_data_sel_2) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_2) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
Mean-centered.
# mean-center GDP per capita, food production, and calories per g
comb_data_sel_2_cent <- comb_data_sel_2 %>%
ungroup() %>%
mutate(PKcal = PKcal - mean(PKcal),
calperg_food_w_calorie = calperg_food_w_calorie - mean(calperg_food_w_calorie),
GDP_pcap_thous2015USD_FAO = GDP_pcap_thous2015USD_FAO - mean(GDP_pcap_thous2015USD_FAO, na.rm = TRUE),
GDP_pcap_thous2015USD_calc = GDP_pcap_thous2015USD_calc - mean(GDP_pcap_thous2015USD_calc, na.rm = TRUE))
calc_lin_model_food_en_use_production(comb_data_sel_2_cent, "2cent")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.76737 -0.02938 -0.02122 -0.00382 0.95912
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.067891 0.002373 28.61 <2e-16 ***
## PKcal 0.611045 0.012713 48.06 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1342 on 3196 degrees of freedom
## Multiple R-squared: 0.4195, Adjusted R-squared: 0.4194
## F-statistic: 2310 on 1 and 3196 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.69948 0.03851 0.04667 0.06407 1.02701
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 0.61105 0.01425 42.89 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1504 on 3197 degrees of freedom
## Multiple R-squared: 0.3653, Adjusted R-squared: 0.3651
## F-statistic: 1840 on 1 and 3197 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75485 -0.04076 -0.01619 0.01344 0.94816
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.789e-02 2.329e-03 29.16 <2e-16 ***
## PKcal 6.254e-01 1.254e-02 49.87 <2e-16 ***
## calperg_food_w_calorie -8.934e-05 7.994e-06 -11.18 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1317 on 3195 degrees of freedom
## Multiple R-squared: 0.4414, Adjusted R-squared: 0.441
## F-statistic: 1262 on 2 and 3195 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74818 -0.03700 -0.01374 0.01221 0.89978
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.889e-02 2.405e-03 28.644 < 2e-16 ***
## PKcal 6.292e-01 1.270e-02 49.542 < 2e-16 ***
## calperg_food_w_calorie -7.797e-05 8.507e-06 -9.166 < 2e-16 ***
## GDP_pcap_thous2015USD_FAO 1.173e-03 1.447e-04 8.105 7.53e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.133 on 3054 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.453, Adjusted R-squared: 0.4524
## F-statistic: 842.9 on 3 and 3054 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49145 -0.01486 -0.00048 0.01550 0.47796
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.173e-02 6.011e-03 15.259 < 2e-16 ***
## PKcal 1.789e+00 2.657e-02 67.351 < 2e-16 ***
## calperg_food_w_calorie -3.889e-05 1.456e-05 -2.672 0.00767 **
## log(GDP_pcap_thous2015USD_FAO) 8.332e-03 2.013e-03 4.140 3.76e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07325 on 1009 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8219, Adjusted R-squared: 0.8213
## F-statistic: 1552 on 3 and 1009 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75095 -0.03659 -0.01307 0.01234 0.91251
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.781e-02 2.371e-03 28.600 < 2e-16 ***
## PKcal 6.318e-01 1.264e-02 49.979 < 2e-16 ***
## calperg_food_w_calorie -7.856e-05 8.736e-06 -8.993 < 2e-16 ***
## GDP_pcap_thous2015USD_calc 9.162e-04 1.233e-04 7.429 1.4e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1322 on 3108 degrees of freedom
## (86 observations deleted due to missingness)
## Multiple R-squared: 0.4507, Adjusted R-squared: 0.4502
## F-statistic: 850 on 3 and 3108 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48910 -0.01402 0.00020 0.01325 0.48332
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.096961 0.005701 17.008 < 2e-16 ***
## PKcal 1.783247 0.026548 67.172 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.007837 0.002010 3.899 0.000103 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07347 on 1010 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8206, Adjusted R-squared: 0.8203
## F-statistic: 2310 on 2 and 1010 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49788 -0.02458 0.00241 0.02343 0.43011
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.105e-01 2.338e-03 47.265 < 2e-16 ***
## PKcal 6.175e-01 1.121e-01 5.509 4.57e-08 ***
## PKcal:calperg_food_w_calorie -8.825e-05 2.606e-04 -0.339 0.735
## PKcal:log(GDP_pcap_thous2015USD_FAO) 3.687e-01 3.317e-02 11.115 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0699 on 1009 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8378, Adjusted R-squared: 0.8373
## F-statistic: 1737 on 3 and 1009 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.51966 -0.02025 -0.00681 0.01459 0.33684
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.240e-03 6.681e-03 0.335 0.737
## PKcal -7.828e-01 1.282e-01 -6.108 1.44e-09 ***
## calperg_food_w_calorie -2.120e-05 1.838e-05 -1.153 0.249
## log(GDP_pcap_thous2015USD_FAO) 3.803e-02 2.234e-03 17.019 < 2e-16 ***
## PKcal:calperg_food_w_calorie -1.875e-04 3.435e-04 -0.546 0.585
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.939e-01 3.899e-02 20.363 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06157 on 1007 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8744, Adjusted R-squared: 0.8738
## F-statistic: 1402 on 5 and 1007 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.087018e-02 1.535038e-02
## PKcal -1.034304e+00 -5.312854e-01
## calperg_food_w_calorie -5.726948e-05 1.487371e-05
## log(GDP_pcap_thous2015USD_FAO) 3.364390e-02 4.241336e-02
## PKcal:calperg_food_w_calorie -8.616208e-04 4.866537e-04
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.174059e-01 8.704221e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49031 -0.01808 -0.00159 0.01725 0.46802
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.501e+00 3.855e-01 -3.894 0.000105 ***
## PKcal 1.795e+00 2.640e-02 68.010 < 2e-16 ***
## calperg_food_w_calorie -2.881e-05 1.465e-05 -1.967 0.049439 *
## log(GDP_pcap_thous2015USD_FAO) 6.195e-03 2.063e-03 3.004 0.002734 **
## year 8.011e-04 1.938e-04 4.133 3.88e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07267 on 1008 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8248, Adjusted R-squared: 0.8241
## F-statistic: 1187 on 4 and 1008 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -2.257488e+00 -7.446602e-01
## PKcal 1.743618e+00 1.847227e+00
## calperg_food_w_calorie -5.755499e-05 -7.085127e-08
## log(GDP_pcap_thous2015USD_FAO) 2.147743e-03 1.024269e-02
## year 4.206983e-04 1.181465e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.56111 -0.00977 -0.00033 0.00900 0.49134
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -6.467e-01 4.619e-01 -1.400 0.16181
## PKcal 4.798e+00 1.244e-01 38.581 < 2e-16 ***
## calperg_food_w_calorie -1.197e-04 2.864e-05 -4.178 3.20e-05 ***
## log(GDP_pcap_thous2015USD_FAO) -7.768e-03 3.623e-03 -2.144 0.03228 *
## year 3.959e-04 2.278e-04 1.738 0.08254 .
## country_nameAustralia 1.790e-01 3.011e-02 5.944 3.86e-09 ***
## country_nameAustria 1.725e-01 2.933e-02 5.880 5.62e-09 ***
## country_nameBelgium 1.645e-01 3.054e-02 5.387 8.99e-08 ***
## country_nameCanada 3.960e-02 2.989e-02 1.325 0.18562
## country_nameCyprus 1.563e-01 2.839e-02 5.505 4.72e-08 ***
## country_nameCzech Republic 1.338e-01 2.851e-02 4.692 3.10e-06 ***
## country_nameDenmark 1.858e-01 3.043e-02 6.107 1.46e-09 ***
## country_nameEstonia 1.287e-01 3.000e-02 4.290 1.97e-05 ***
## country_nameFinland 1.458e-01 3.091e-02 4.718 2.72e-06 ***
## country_nameFrance -8.138e-02 2.923e-02 -2.784 0.00547 **
## country_nameGermany -1.239e-01 3.109e-02 -3.984 7.28e-05 ***
## country_nameGreece 8.003e-02 2.710e-02 2.953 0.00322 **
## country_nameHong Kong 2.124e-01 4.840e-02 4.389 1.27e-05 ***
## country_nameIceland 1.752e-01 3.094e-02 5.663 1.95e-08 ***
## country_nameIreland 1.625e-01 2.915e-02 5.575 3.21e-08 ***
## country_nameIsrael 1.324e-01 2.934e-02 4.512 7.19e-06 ***
## country_nameItaly -1.654e-01 2.926e-02 -5.653 2.07e-08 ***
## country_nameJapan -2.702e-01 3.070e-02 -8.802 < 2e-16 ***
## country_nameKorea, Republic of -5.317e-02 2.802e-02 -1.897 0.05808 .
## country_nameLuxembourg 1.615e-01 3.522e-02 4.586 5.11e-06 ***
## country_nameMalta 1.522e-01 3.436e-02 4.431 1.05e-05 ***
## country_nameNetherlands 1.439e-01 3.036e-02 4.740 2.45e-06 ***
## country_nameNew Zealand 2.054e-01 2.895e-02 7.094 2.51e-12 ***
## country_nameNorway 1.675e-01 3.186e-02 5.257 1.80e-07 ***
## country_namePortugal 8.791e-02 2.867e-02 3.066 0.00223 **
## country_nameSlovakia 1.541e-01 3.358e-02 4.589 5.04e-06 ***
## country_nameSlovenia 1.453e-01 2.846e-02 5.107 3.94e-07 ***
## country_nameSpain -2.662e-02 2.816e-02 -0.945 0.34476
## country_nameSweden 1.301e-01 3.113e-02 4.178 3.21e-05 ***
## country_nameSwitzerland 1.570e-01 3.194e-02 4.915 1.04e-06 ***
## country_nameUnited Kingdom -4.872e-02 3.071e-02 -1.586 0.11296
## country_nameUnited States of America -1.078e+00 5.635e-02 -19.123 < 2e-16 ***
## country_nameUruguay 1.549e-01 3.925e-02 3.947 8.48e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05443 on 975 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.905, Adjusted R-squared: 0.9013
## F-statistic: 250.9 on 37 and 975 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.553223e+00 0.2597593592
## PKcal 4.553718e+00 5.0417829627
## calperg_food_w_calorie -1.758538e-04 -0.0000634566
## log(GDP_pcap_thous2015USD_FAO) -1.487870e-02 -0.0006581545
## year -5.113286e-05 0.0008428836
## country_nameAustralia 1.198896e-01 0.2380564248
## country_nameAustria 1.149248e-01 0.2300542753
## country_nameBelgium 1.045678e-01 0.2244123559
## country_nameCanada -1.906728e-02 0.0982622229
## country_nameCyprus 1.005694e-01 0.2119925140
## country_nameCzech Republic 7.781644e-02 0.1897231634
## country_nameDenmark 1.261187e-01 0.2455423058
## country_nameEstonia 6.982879e-02 0.1875804920
## country_nameFinland 8.517985e-02 0.2064806262
## country_nameFrance -1.387385e-01 -0.0240223365
## country_nameGermany -1.849014e-01 -0.0628602184
## country_nameGreece 2.685287e-02 0.1332147992
## country_nameHong Kong 1.174296e-01 0.3073956554
## country_nameIceland 1.145058e-01 0.2359389225
## country_nameIreland 1.052970e-01 0.2196956579
## country_nameIsrael 7.480933e-02 0.1899479014
## country_nameItaly -2.227932e-01 -0.1079649354
## country_nameJapan -3.304609e-01 -0.2099731853
## country_nameKorea, Republic of -1.081611e-01 0.0018231103
## country_nameLuxembourg 9.240309e-02 0.2306537419
## country_nameMalta 8.480716e-02 0.2196560229
## country_nameNetherlands 8.434366e-02 0.2035094679
## country_nameNew Zealand 1.485592e-01 0.2621900325
## country_nameNorway 1.049608e-01 0.2300113733
## country_namePortugal 3.164323e-02 0.1441797918
## country_nameSlovakia 8.819305e-02 0.2199904033
## country_nameSlovenia 8.947763e-02 0.2011580498
## country_nameSpain -8.187654e-02 0.0286412436
## country_nameSweden 6.896800e-02 0.1911511413
## country_nameSwitzerland 9.428763e-02 0.2196364055
## country_nameUnited Kingdom -1.089949e-01 0.0115457864
## country_nameUnited States of America -1.188207e+00 -0.9670392955
## country_nameUruguay 7.789410e-02 0.2319327260
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49923 -0.01622 -0.00545 0.01095 0.34130
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.750e-01 3.779e-01 -0.992 0.32123
## staples 9.286e-02 2.264e-01 0.410 0.68176
## nonstaples_animal -8.775e-01 2.676e-01 -3.280 0.00107 **
## nonstaples_other 5.433e+00 2.979e-01 18.240 < 2e-16 ***
## calperg_food_w_calorie 1.641e-05 1.418e-05 1.157 0.24764
## log(GDP_pcap_thous2015USD_FAO) 4.829e-03 1.961e-03 2.463 0.01395 *
## year 1.889e-04 1.898e-04 0.995 0.31982
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06785 on 1006 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8476, Adjusted R-squared: 0.8467
## F-statistic: 932.5 on 6 and 1006 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.116570e+00 0.3665131392
## staples -3.513737e-01 0.5370883735
## nonstaples_animal -1.402524e+00 -0.3524761198
## nonstaples_other 4.848673e+00 6.0177052220
## calperg_food_w_calorie -1.142461e-05 0.0000442359
## log(GDP_pcap_thous2015USD_FAO) 9.813582e-04 0.0086758423
## year -1.835010e-04 0.0005612540
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.52511 -0.01608 -0.00918 0.00167 0.70665
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.828e-01 2.508e-01 -1.925 0.05434 .
## staples -2.862e-01 2.581e-02 -11.087 < 2e-16 ***
## nonstaples_animal 5.911e+00 1.048e-01 56.387 < 2e-16 ***
## nonstaples_other -1.855e-01 1.012e-01 -1.833 0.06695 .
## calperg_food_w_calorie -5.797e-06 5.737e-06 -1.011 0.31234
## GDP_pcap_thous2015USD_FAO -2.578e-04 9.814e-05 -2.627 0.00866 **
## year 2.453e-04 1.257e-04 1.952 0.05108 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08727 on 3051 degrees of freedom
## (140 observations deleted due to missingness)
## Multiple R-squared: 0.7646, Adjusted R-squared: 0.7641
## F-statistic: 1652 on 6 and 3051 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -9.746940e-01 8.995388e-03
## staples -3.368057e-01 -2.355785e-01
## nonstaples_animal 5.705225e+00 6.116294e+00
## nonstaples_other -3.839281e-01 1.296601e-02
## calperg_food_w_calorie -1.704490e-05 5.451171e-06
## GDP_pcap_thous2015USD_FAO -4.502237e-04 -6.536275e-05
## year -1.147364e-06 4.916574e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49941 -0.01522 -0.00510 0.01020 0.34333
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples 7.948e-02 2.260e-01 0.352 0.725108
## nonstaples_animal -9.586e-01 2.548e-01 -3.763 0.000178 ***
## nonstaples_other 5.511e+00 2.874e-01 19.171 < 2e-16 ***
## calperg_food_w_calorie 1.521e-05 1.413e-05 1.076 0.282085
## log(GDP_pcap_thous2015USD_FAO) 5.281e-03 1.907e-03 2.770 0.005714 **
## year 5.740e-07 3.042e-06 0.189 0.850365
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06785 on 1007 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8802, Adjusted R-squared: 0.8795
## F-statistic: 1233 on 6 and 1007 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -3.639549e-01 5.229242e-01
## nonstaples_animal -1.458523e+00 -4.586359e-01
## nonstaples_other 4.946620e+00 6.074755e+00
## calperg_food_w_calorie -1.252122e-05 4.293688e-05
## log(GDP_pcap_thous2015USD_FAO) 1.539486e-03 9.022863e-03
## year -5.395013e-06 6.542996e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49144 -0.01514 -0.00065 0.01518 0.47740
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.790e+00 2.655e-02 67.427 < 2e-16 ***
## calperg_food_w_calorie -3.802e-05 1.456e-05 -2.612 0.00913 **
## log(GDP_pcap_thous2015USD_FAO) 8.102e-03 2.018e-03 4.015 6.37e-05 ***
## year 4.632e-05 3.020e-06 15.335 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07318 on 1009 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8604, Adjusted R-squared: 0.8598
## F-statistic: 1554 on 4 and 1009 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.737894e+00 1.842082e+00
## calperg_food_w_calorie -6.658691e-05 -9.460531e-06
## log(GDP_pcap_thous2015USD_FAO) 4.142509e-03 1.206108e-02
## year 4.038937e-05 5.224256e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49954 -0.01486 -0.00181 0.01522 0.47209
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.807e+00 2.659e-02 67.970 < 2e-16 ***
## staples_frac -1.462e-01 3.293e-02 -4.440 1e-05 ***
## calperg_food_w_calorie -4.559e-05 1.452e-05 -3.139 0.00174 **
## log(GDP_pcap_thous2015USD_FAO) 4.051e-03 2.198e-03 1.843 0.06560 .
## year 7.384e-05 6.884e-06 10.727 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07251 on 1008 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.863, Adjusted R-squared: 0.8624
## F-statistic: 1270 on 5 and 1008 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.755016e+00 1.859365e+00
## staples_frac -2.108486e-01 -8.159301e-02
## calperg_food_w_calorie -7.408801e-05 -1.709030e-05
## log(GDP_pcap_thous2015USD_FAO) -2.618112e-04 8.362983e-03
## year 6.033068e-05 8.734655e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49856 -0.01480 -0.00171 0.01478 0.47359
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.804e+00 2.661e-02 67.822 < 2e-16 ***
## nonstaples_frac 1.268e-01 3.195e-02 3.968 7.76e-05 ***
## calperg_food_w_calorie -4.536e-05 1.457e-05 -3.114 0.0019 **
## log(GDP_pcap_thous2015USD_FAO) 4.750e-03 2.174e-03 2.185 0.0291 *
## year 6.429e-06 1.049e-05 0.613 0.5401
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07265 on 1008 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8625, Adjusted R-squared: 0.8618
## F-statistic: 1265 on 5 and 1008 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.752236e+00 1.856654e+00
## nonstaples_frac 6.408635e-02 1.894927e-01
## calperg_food_w_calorie -7.394984e-05 -1.677373e-05
## log(GDP_pcap_thous2015USD_FAO) 4.840911e-04 9.015894e-03
## year -1.415542e-05 2.701381e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49901 -0.01501 -0.00161 0.01546 0.47080
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.698e+00 1.458e-01 11.642 < 2e-16 ***
## staples_frac -1.529e-01 3.407e-02 -4.487 8.07e-06 ***
## calperg_food_w_calorie -4.938e-05 1.535e-05 -3.217 0.00134 **
## log(GDP_pcap_thous2015USD_FAO) 3.613e-03 2.271e-03 1.591 0.11198
## year 7.521e-05 7.114e-06 10.572 < 2e-16 ***
## PKcal:staples_frac 3.907e-01 5.114e-01 0.764 0.44502
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07252 on 1007 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8631, Adjusted R-squared: 0.8623
## F-statistic: 1058 on 6 and 1007 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.411482e+00 1.983799e+00
## staples_frac -2.197393e-01 -8.601317e-02
## calperg_food_w_calorie -7.950570e-05 -1.925871e-05
## log(GDP_pcap_thous2015USD_FAO) -8.439841e-04 8.070375e-03
## year 6.124628e-05 8.916569e-05
## PKcal:staples_frac -6.128248e-01 1.394323e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.034485 -0.006645 -0.001536 0.005350 0.050929
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 1.405e+01 4.361e+00 3.221 0.00153 **
## Corn -9.312e-01 6.264e+00 -0.149 0.88201
## Dairy 2.127e+01 2.649e+00 8.028 1.60e-13 ***
## FiberCrop 8.712e+01 1.938e+01 4.495 1.29e-05 ***
## Fruits -2.911e+01 9.087e+00 -3.204 0.00162 **
## Legumes 2.337e+01 1.071e+01 2.181 0.03053 *
## MiscCrop -1.671e+01 1.408e+01 -1.187 0.23695
## NutsSeeds 2.754e+01 1.150e+01 2.395 0.01769 *
## OilCrop -8.250e-01 2.105e+00 -0.392 0.69558
## OilPalm 1.819e+01 7.857e+00 2.315 0.02179 *
## OtherGrain 1.991e+00 5.209e+00 0.382 0.70274
## OtherMeat_Fish 1.838e+01 7.468e+00 2.461 0.01484 *
## Poultry 1.860e+01 6.550e+00 2.839 0.00508 **
## Rice 5.607e+00 1.246e+00 4.499 1.27e-05 ***
## RootTuber 8.517e+00 7.332e+00 1.162 0.24701
## SheepGoat 3.193e+01 1.790e+01 1.784 0.07628 .
## Soybean 3.915e+00 3.996e+00 0.980 0.32870
## SugarCrop -1.183e+01 3.400e+00 -3.479 0.00064 ***
## Vegetables -4.645e+01 1.055e+01 -4.403 1.89e-05 ***
## Wheat -2.928e+00 1.759e+00 -1.665 0.09785 .
## NEC -2.470e+00 3.186e+00 -0.775 0.43936
## Pork 7.362e+00 4.800e+00 1.534 0.12694
## calperg_food_w_calorie 1.460e-05 1.023e-05 1.427 0.15536
## log(GDP_pcap_thous2015USD_FAO) 8.370e-04 9.716e-04 0.861 0.39022
## year 2.210e-06 1.535e-06 1.439 0.15195
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0134 on 169 degrees of freedom
## (3004 observations deleted due to missingness)
## Multiple R-squared: 0.9968, Adjusted R-squared: 0.9963
## F-statistic: 2114 on 25 and 169 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef 5.437251e+00 2.265718e+01
## Corn -1.329756e+01 1.143520e+01
## Dairy 1.603962e+01 2.649961e+01
## FiberCrop 4.885806e+01 1.253745e+02
## Fruits -4.705380e+01 -1.117544e+01
## Legumes 2.221555e+00 4.452137e+01
## MiscCrop -4.449235e+01 1.108084e+01
## NutsSeeds 4.845299e+00 5.024243e+01
## OilCrop -4.980234e+00 3.330163e+00
## OilPalm 2.681503e+00 3.370224e+01
## OtherGrain -8.291438e+00 1.227369e+01
## OtherMeat_Fish 3.639404e+00 3.312392e+01
## Poultry 5.664993e+00 3.152620e+01
## Rice 3.146653e+00 8.067245e+00
## RootTuber -5.956675e+00 2.299068e+01
## SheepGoat -3.410469e+00 6.727167e+01
## Soybean -3.974535e+00 1.180395e+01
## SugarCrop -1.853924e+01 -5.116571e+00
## Vegetables -6.727311e+01 -2.562341e+01
## Wheat -6.399895e+00 5.444338e-01
## NEC -8.760183e+00 3.820503e+00
## Pork -2.113218e+00 1.683780e+01
## calperg_food_w_calorie -5.595298e-06 3.480131e-05
## log(GDP_pcap_thous2015USD_FAO) -1.081090e-03 2.755081e-03
## year -8.213406e-07 5.240816e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49252 -0.01521 0.00018 0.01347 0.44551
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 3.119e-06 4.612e-08 67.619 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 8.154e-03 2.005e-03 4.067 5.13e-05 ***
## year -1.044e-05 2.846e-06 -3.668 0.000257 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07307 on 1010 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8606, Adjusted R-squared: 0.8602
## F-statistic: 2079 on 3 and 1010 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 3.028221e-06 3.209232e-06
## log(GDP_pcap_thous2015USD_FAO) 4.219660e-03 1.208747e-02
## year -1.602535e-05 -4.855094e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48862 -0.01545 0.00007 0.01364 0.44368
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 3.214e-06 1.803e-07 17.825 < 2e-16 ***
## Feed_Kt -1.372e-07 2.509e-07 -0.547 0.584533
## log(GDP_pcap_thous2015USD_FAO) 8.252e-03 2.014e-03 4.098 4.49e-05 ***
## year -1.069e-05 2.885e-06 -3.707 0.000221 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0731 on 1009 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8607, Adjusted R-squared: 0.8601
## F-statistic: 1558 on 4 and 1009 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 2.860242e-06 3.567883e-06
## Feed_Kt -6.296444e-07 3.551544e-07
## log(GDP_pcap_thous2015USD_FAO) 4.301170e-03 1.220359e-02
## year -1.635523e-05 -5.033344e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49470 -0.01428 0.00018 0.01313 0.48346
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.710e+00 9.764e-02 17.513 < 2e-16 ***
## Feed_Kt 1.868e-07 2.373e-07 0.787 0.431406
## log(GDP_pcap_thous2015USD_FAO) 7.486e-03 2.020e-03 3.706 0.000222 ***
## year 4.678e-05 3.929e-06 11.907 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0734 on 1009 degrees of freedom
## (2185 observations deleted due to missingness)
## Multiple R-squared: 0.8595, Adjusted R-squared: 0.8589
## F-statistic: 1543 on 4 and 1009 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.518396e+00 1.901612e+00
## Feed_Kt -2.789113e-07 6.525154e-07
## log(GDP_pcap_thous2015USD_FAO) 3.522480e-03 1.144934e-02
## year 3.907427e-05 5.449441e-05
## png
## 2
# get regions and years to remove
country_years_excl_all_inonspec <- IEA_ind_sectors_region_fuel %>%
filter(FLOW == "INONSPEC") %>%
filter(frac_sector == 1) %>%
dplyr::select(iso, country_name, GCAM_region_ID, year) %>%
distinct()
comb_data_sel_3 <- comb_data_sel_cats %>%
filter(year >= 2010 & year <= 2015,
!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_all_inonspec)
calc_lin_model_food_en_use_production(comb_data_sel_3, "3")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.45198 -0.03024 -0.02595 -0.01374 0.69187
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.027741 0.006765 4.101 5.06e-05 ***
## PKcal 1.234880 0.031067 39.749 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1256 on 372 degrees of freedom
## Multiple R-squared: 0.8094, Adjusted R-squared: 0.8089
## F-statistic: 1580 on 1 and 372 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48436 -0.00301 0.00159 0.01312 0.70850
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.27059 0.03045 41.73 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1282 on 373 degrees of freedom
## Multiple R-squared: 0.8236, Adjusted R-squared: 0.8231
## F-statistic: 1742 on 1 and 373 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44929 -0.03202 -0.02195 -0.01292 0.69000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.421e-02 4.975e-02 -0.487 0.627
## PKcal 1.240e+00 3.143e-02 39.451 <2e-16 ***
## calperg_food_w_calorie 3.107e-05 2.948e-05 1.054 0.293
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1256 on 371 degrees of freedom
## Multiple R-squared: 0.81, Adjusted R-squared: 0.809
## F-statistic: 790.8 on 2 and 371 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44377 -0.03509 -0.01837 -0.00422 0.69683
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.383e-02 5.058e-02 -1.064 0.28792
## PKcal 1.245e+00 3.136e-02 39.685 < 2e-16 ***
## calperg_food_w_calorie 3.815e-05 2.965e-05 1.287 0.19895
## GDP_pcap_thous2015USD_FAO 8.855e-04 2.968e-04 2.983 0.00305 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1251 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8146, Adjusted R-squared: 0.8131
## F-statistic: 533.2 on 3 and 364 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44216 -0.04049 -0.02196 0.00050 0.69135
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.772e-02 5.235e-02 -1.676 0.094660 .
## PKcal 1.242e+00 3.117e-02 39.833 < 2e-16 ***
## calperg_food_w_calorie 4.142e-05 2.954e-05 1.402 0.161769
## log(GDP_pcap_thous2015USD_FAO) 1.934e-02 5.450e-03 3.549 0.000437 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1245 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8165, Adjusted R-squared: 0.8149
## F-statistic: 539.7 on 3 and 364 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44402 -0.03507 -0.02041 -0.00510 0.69447
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.200e-02 5.142e-02 -1.011 0.31259
## PKcal 1.245e+00 3.173e-02 39.244 < 2e-16 ***
## calperg_food_w_calorie 3.753e-05 3.004e-05 1.249 0.21237
## GDP_pcap_thous2015USD_calc 7.380e-04 2.650e-04 2.785 0.00564 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1263 on 358 degrees of freedom
## (12 observations deleted due to missingness)
## Multiple R-squared: 0.8138, Adjusted R-squared: 0.8123
## F-statistic: 521.7 on 3 and 358 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44596 -0.03985 -0.01968 -0.00205 0.69280
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.017333 0.014851 -1.167 0.243897
## PKcal 1.235038 0.030851 40.032 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.018809 0.005444 3.455 0.000615 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1247 on 365 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8155, Adjusted R-squared: 0.8145
## F-statistic: 806.5 on 2 and 365 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.34206 -0.01175 0.00831 0.01366 0.48820
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0120053 0.0049064 -2.447 0.014883 *
## PKcal -3.5559032 0.2817795 -12.619 < 2e-16 ***
## PKcal:calperg_food_w_calorie 0.0032276 0.0002568 12.568 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.1932841 0.0522632 3.698 0.000251 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08126 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9218, Adjusted R-squared: 0.9212
## F-statistic: 1431 on 3 and 364 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.34942 -0.01879 0.00329 0.01979 0.46155
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.451e-01 3.482e-02 4.168 3.85e-05 ***
## PKcal -4.141e+00 2.981e-01 -13.891 < 2e-16 ***
## calperg_food_w_calorie -9.925e-05 2.025e-05 -4.902 1.43e-06 ***
## log(GDP_pcap_thous2015USD_FAO) 1.729e-03 3.768e-03 0.459 0.6466
## PKcal:calperg_food_w_calorie 3.751e-03 2.731e-04 13.738 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 1.222e-01 5.611e-02 2.177 0.0301 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07887 on 362 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9268, Adjusted R-squared: 0.9258
## F-statistic: 916.2 on 5 and 362 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 0.0766594309 2.136179e-01
## PKcal -4.7269544956 -3.554581e+00
## calperg_food_w_calorie -0.0001390709 -5.943878e-05
## log(GDP_pcap_thous2015USD_FAO) -0.0056803030 9.138599e-03
## PKcal:calperg_food_w_calorie 0.0032144947 4.288493e-03
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.0118182776 2.324896e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43825 -0.04090 -0.02236 0.00047 0.69047
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.141e+00 7.661e+00 0.410 0.682008
## PKcal 1.242e+00 3.121e-02 39.787 < 2e-16 ***
## calperg_food_w_calorie 4.128e-05 2.958e-05 1.395 0.163734
## log(GDP_pcap_thous2015USD_FAO) 1.936e-02 5.456e-03 3.548 0.000439 ***
## year -1.604e-03 3.806e-03 -0.422 0.673629
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1247 on 363 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8165, Adjusted R-squared: 0.8145
## F-statistic: 403.9 on 4 and 363 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.192418e+01 1.820709e+01
## PKcal 1.180285e+00 1.303025e+00
## calperg_food_w_calorie -1.689148e-05 9.944196e-05
## log(GDP_pcap_thous2015USD_FAO) 8.631072e-03 3.009152e-02
## year -9.089612e-03 5.880780e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.054320 -0.001858 0.000034 0.001806 0.077690
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 2.512e-01 9.280e-01
## PKcal -1.477e+00 1.202e-01
## calperg_food_w_calorie -3.913e-05 1.825e-05
## log(GDP_pcap_thous2015USD_FAO) 3.835e-02 1.733e-02
## year -1.238e-04 4.683e-04
## country_nameArmenia 2.600e-03 1.022e-02
## country_nameAustralia 1.005e-01 4.813e-02
## country_nameAustria -3.241e-02 4.845e-02
## country_nameAzerbaijan 2.181e-02 1.274e-02
## country_nameBelarus 2.955e-02 1.219e-02
## country_nameBelgium 7.035e-03 4.666e-02
## country_nameBenin 8.151e-02 2.779e-02
## country_nameBosnia and Herzegovina 2.278e-03 9.180e-03
## country_nameBotswana -1.371e-03 1.793e-02
## country_nameBrazil 1.289e+00 3.124e-02
## country_nameBulgaria 1.843e-02 1.963e-02
## country_nameCameroon 8.102e-02 2.021e-02
## country_nameCanada 4.780e-02 4.646e-02
## country_nameChile 3.402e-03 2.997e-02
## country_nameChina 4.123e+00 1.908e-01
## country_nameColombia 1.358e-01 1.447e-02
## country_nameCongo 4.099e-02 1.733e-02
## country_nameCosta Rica 7.059e-03 2.694e-02
## country_nameCote dIvoire 9.262e-02 1.765e-02
## country_nameCroatia -1.661e-02 2.454e-02
## country_nameCyprus -5.393e-02 3.742e-02
## country_nameCzech Republic -4.069e-04 3.156e-02
## country_nameDenmark -5.290e-02 4.964e-02
## country_nameDominican Republic 2.505e-02 1.451e-02
## country_nameEstonia -4.547e-02 2.890e-02
## country_nameFinland -6.067e-02 4.547e-02
## country_nameGeorgia 2.896e-02 1.279e-02
## country_nameGermany 2.862e-01 4.367e-02
## country_nameGreece -1.208e-02 3.172e-02
## country_nameHungary 1.460e-02 2.814e-02
## country_nameIceland -8.862e-02 4.824e-02
## country_nameIreland -6.220e-02 4.820e-02
## country_nameItaly 1.649e-01 4.038e-02
## country_nameJapan 3.558e-01 4.258e-02
## country_nameKazakhstan 1.494e-02 1.906e-02
## country_nameKorea, Republic of 1.028e-01 3.786e-02
## country_nameKyrgyzstan 5.987e-02 2.254e-02
## country_nameLatvia -3.051e-02 2.469e-02
## country_nameLithuania -2.614e-02 2.518e-02
## country_nameLuxembourg -1.216e-01 6.035e-02
## country_nameMacedonia, the former Yugoslav Republic of 2.217e-03 1.015e-02
## country_nameMexico 2.552e-01 2.631e-02
## country_nameMoldova, Republic of 5.745e-02 1.634e-02
## country_nameMontenegro -1.006e-02 1.446e-02
## country_nameMorocco 1.066e-01 1.648e-02
## country_nameMozambique 1.256e-01 3.328e-02
## country_nameNetherlands 2.503e-02 4.587e-02
## country_nameNorway -7.988e-02 5.484e-02
## country_namePoland 1.170e-01 2.490e-02
## country_namePortugal -1.617e-02 3.141e-02
## country_nameRomania 3.205e-02 1.601e-02
## country_nameRussian Federation 5.665e-01 2.538e-02
## country_nameSenegal 1.118e-01 2.811e-02
## country_nameSerbia 3.368e-02 1.261e-02
## country_nameSlovakia -1.758e-02 3.236e-02
## country_nameSlovenia -4.816e-02 3.381e-02
## country_nameSpain 1.035e-01 3.513e-02
## country_nameSwitzerland -6.860e-02 5.816e-02
## country_nameTajikistan 8.648e-02 2.735e-02
## country_nameThailand 3.998e-01 2.037e-02
## country_nameTunisia 3.798e-02 1.181e-02
## country_nameUkraine 1.708e-01 1.360e-02
## country_nameUnited Kingdom 1.376e-01 4.597e-02
## country_nameUnited States of America 1.706e+00 6.106e-02
## country_nameUruguay -2.268e-02 3.196e-02
## country_nameVenezuela 4.718e-02 3.008e-02
## country_nameViet Nam 4.180e-01 2.308e-02
## t value Pr(>|t|)
## (Intercept) 0.271 0.786783
## PKcal -12.292 < 2e-16 ***
## calperg_food_w_calorie -2.144 0.032879 *
## log(GDP_pcap_thous2015USD_FAO) 2.213 0.027660 *
## year -0.264 0.791673
## country_nameArmenia 0.254 0.799459
## country_nameAustralia 2.089 0.037578 *
## country_nameAustria -0.669 0.504098
## country_nameAzerbaijan 1.712 0.087924 .
## country_nameBelarus 2.424 0.015955 *
## country_nameBelgium 0.151 0.880263
## country_nameBenin 2.933 0.003615 **
## country_nameBosnia and Herzegovina 0.248 0.804167
## country_nameBotswana -0.076 0.939085
## country_nameBrazil 41.265 < 2e-16 ***
## country_nameBulgaria 0.939 0.348659
## country_nameCameroon 4.008 7.75e-05 ***
## country_nameCanada 1.029 0.304345
## country_nameChile 0.114 0.909692
## country_nameChina 21.610 < 2e-16 ***
## country_nameColombia 9.389 < 2e-16 ***
## country_nameCongo 2.365 0.018694 *
## country_nameCosta Rica 0.262 0.793466
## country_nameCote dIvoire 5.247 2.95e-07 ***
## country_nameCroatia -0.677 0.498880
## country_nameCyprus -1.441 0.150525
## country_nameCzech Republic -0.013 0.989724
## country_nameDenmark -1.066 0.287463
## country_nameDominican Republic 1.726 0.085364 .
## country_nameEstonia -1.573 0.116685
## country_nameFinland -1.334 0.183161
## country_nameGeorgia 2.264 0.024321 *
## country_nameGermany 6.554 2.49e-10 ***
## country_nameGreece -0.381 0.703537
## country_nameHungary 0.519 0.604352
## country_nameIceland -1.837 0.067216 .
## country_nameIreland -1.290 0.197923
## country_nameItaly 4.084 5.69e-05 ***
## country_nameJapan 8.357 2.54e-15 ***
## country_nameKazakhstan 0.784 0.433811
## country_nameKorea, Republic of 2.715 0.007020 **
## country_nameKyrgyzstan 2.656 0.008331 **
## country_nameLatvia -1.235 0.217661
## country_nameLithuania -1.038 0.300056
## country_nameLuxembourg -2.014 0.044915 *
## country_nameMacedonia, the former Yugoslav Republic of 0.218 0.827213
## country_nameMexico 9.700 < 2e-16 ***
## country_nameMoldova, Republic of 3.516 0.000507 ***
## country_nameMontenegro -0.696 0.487066
## country_nameMorocco 6.465 4.18e-10 ***
## country_nameMozambique 3.772 0.000195 ***
## country_nameNetherlands 0.546 0.585726
## country_nameNorway -1.457 0.146279
## country_namePoland 4.700 3.99e-06 ***
## country_namePortugal -0.515 0.607018
## country_nameRomania 2.001 0.046260 *
## country_nameRussian Federation 22.322 < 2e-16 ***
## country_nameSenegal 3.977 8.78e-05 ***
## country_nameSerbia 2.671 0.007978 **
## country_nameSlovakia -0.543 0.587427
## country_nameSlovenia -1.425 0.155355
## country_nameSpain 2.947 0.003464 **
## country_nameSwitzerland -1.180 0.239098
## country_nameTajikistan 3.162 0.001727 **
## country_nameThailand 19.629 < 2e-16 ***
## country_nameTunisia 3.216 0.001446 **
## country_nameUkraine 12.562 < 2e-16 ***
## country_nameUnited Kingdom 2.994 0.002990 **
## country_nameUnited States of America 27.938 < 2e-16 ***
## country_nameUruguay -0.710 0.478400
## country_nameVenezuela 1.568 0.117850
## country_nameViet Nam 18.112 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01203 on 296 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9986, Adjusted R-squared: 0.9983
## F-statistic: 2989 on 71 and 296 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -1.574988e+00
## PKcal -1.713567e+00
## calperg_food_w_calorie -7.505061e-05
## log(GDP_pcap_thous2015USD_FAO) 4.245531e-03
## year -1.045456e-03
## country_nameArmenia -1.751993e-02
## country_nameAustralia 5.814326e-03
## country_nameAustria -1.277660e-01
## country_nameAzerbaijan -3.259930e-03
## country_nameBelarus 5.557915e-03
## country_nameBelgium -8.479977e-02
## country_nameBenin 2.682509e-02
## country_nameBosnia and Herzegovina -1.578846e-02
## country_nameBotswana -3.665933e-02
## country_nameBrazil 1.227601e+00
## country_nameBulgaria -2.020792e-02
## country_nameCameroon 4.123867e-02
## country_nameCanada -4.362537e-02
## country_nameChile -5.557392e-02
## country_nameChina 3.747332e+00
## country_nameColombia 1.073488e-01
## country_nameCongo 6.874913e-03
## country_nameCosta Rica -4.595500e-02
## country_nameCote dIvoire 5.788427e-02
## country_nameCroatia -6.489972e-02
## country_nameCyprus -1.275707e-01
## country_nameCzech Republic -6.252227e-02
## country_nameDenmark -1.505949e-01
## country_nameDominican Republic -3.509626e-03
## country_nameEstonia -1.023463e-01
## country_nameFinland -1.501631e-01
## country_nameGeorgia 3.781664e-03
## country_nameGermany 2.002675e-01
## country_nameGreece -7.450574e-02
## country_nameHungary -4.078879e-02
## country_nameIceland -1.835521e-01
## country_nameIreland -1.570566e-01
## country_nameItaly 8.547107e-02
## country_nameJapan 2.720054e-01
## country_nameKazakhstan -2.257678e-02
## country_nameKorea, Republic of 2.827171e-02
## country_nameKyrgyzstan 1.551071e-02
## country_nameLatvia -7.910744e-02
## country_nameLithuania -7.568148e-02
## country_nameLuxembourg -2.403316e-01
## country_nameMacedonia, the former Yugoslav Republic of -1.775315e-02
## country_nameMexico 2.034217e-01
## country_nameMoldova, Republic of 2.529387e-02
## country_nameMontenegro -3.852192e-02
## country_nameMorocco 7.411813e-02
## country_nameMozambique 6.005134e-02
## country_nameNetherlands -6.524257e-02
## country_nameNorway -1.878110e-01
## country_namePoland 6.802270e-02
## country_namePortugal -7.798113e-02
## country_nameRomania 5.349119e-04
## country_nameRussian Federation 5.165874e-01
## country_nameSenegal 5.646184e-02
## country_nameSerbia 8.864939e-03
## country_nameSlovakia -8.125452e-02
## country_nameSlovenia -1.147069e-01
## country_nameSpain 3.439362e-02
## country_nameSwitzerland -1.830602e-01
## country_nameTajikistan 3.266493e-02
## country_nameThailand 3.596763e-01
## country_nameTunisia 1.473477e-02
## country_nameUkraine 1.440806e-01
## country_nameUnited Kingdom 4.714688e-02
## country_nameUnited States of America 1.585639e+00
## country_nameUruguay -8.557552e-02
## country_nameVenezuela -1.202060e-02
## country_nameViet Nam 3.725669e-01
## 97.5 %
## (Intercept) 2.077448e+00
## PKcal -1.240584e+00
## calperg_food_w_calorie -3.205287e-06
## log(GDP_pcap_thous2015USD_FAO) 7.245465e-02
## year 7.978326e-04
## country_nameArmenia 2.271899e-02
## country_nameAustralia 1.952436e-01
## country_nameAustria 6.294770e-02
## country_nameAzerbaijan 4.688095e-02
## country_nameBelarus 5.354606e-02
## country_nameBelgium 9.887039e-02
## country_nameBenin 1.362011e-01
## country_nameBosnia and Herzegovina 2.034516e-02
## country_nameBotswana 3.391647e-02
## country_nameBrazil 1.350558e+00
## country_nameBulgaria 5.706471e-02
## country_nameCameroon 1.208043e-01
## country_nameCanada 1.392274e-01
## country_nameChile 6.237795e-02
## country_nameChina 4.498272e+00
## country_nameColombia 1.642893e-01
## country_nameCongo 7.510227e-02
## country_nameCosta Rica 6.007306e-02
## country_nameCote dIvoire 1.273603e-01
## country_nameCroatia 3.167393e-02
## country_nameCyprus 1.970379e-02
## country_nameCzech Republic 6.170855e-02
## country_nameDenmark 4.479620e-02
## country_nameDominican Republic 5.360536e-02
## country_nameEstonia 1.140286e-02
## country_nameFinland 2.882119e-02
## country_nameGeorgia 5.413241e-02
## country_nameGermany 3.721644e-01
## country_nameGreece 5.034102e-02
## country_nameHungary 6.998559e-02
## country_nameIceland 6.321244e-03
## country_nameIreland 3.266179e-02
## country_nameItaly 2.444255e-01
## country_nameJapan 4.395826e-01
## country_nameKazakhstan 5.245990e-02
## country_nameKorea, Republic of 1.772728e-01
## country_nameKyrgyzstan 1.042231e-01
## country_nameLatvia 1.809159e-02
## country_nameLithuania 2.341030e-02
## country_nameLuxembourg -2.775313e-03
## country_nameMacedonia, the former Yugoslav Republic of 2.218694e-02
## country_nameMexico 3.069748e-01
## country_nameMoldova, Republic of 8.961165e-02
## country_nameMontenegro 1.839655e-02
## country_nameMorocco 1.389977e-01
## country_nameMozambique 1.910531e-01
## country_nameNetherlands 1.152981e-01
## country_nameNorway 2.804480e-02
## country_namePoland 1.660232e-01
## country_namePortugal 4.563885e-02
## country_nameRomania 6.355686e-02
## country_nameRussian Federation 6.164828e-01
## country_nameSenegal 1.670867e-01
## country_nameSerbia 5.849075e-02
## country_nameSlovakia 4.610409e-02
## country_nameSlovenia 1.837706e-02
## country_nameSpain 1.726795e-01
## country_nameSwitzerland 4.585129e-02
## country_nameTajikistan 1.403009e-01
## country_nameThailand 4.398372e-01
## country_nameTunisia 6.122081e-02
## country_nameUkraine 1.976115e-01
## country_nameUnited Kingdom 2.280936e-01
## country_nameUnited States of America 1.825962e+00
## country_nameUruguay 4.020995e-02
## country_nameVenezuela 1.063860e-01
## country_nameViet Nam 4.634029e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32286 -0.01667 0.00002 0.00929 0.40774
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.305e+00 4.279e+00 1.006 0.315070
## staples -1.145e+00 3.300e-01 -3.471 0.000582 ***
## nonstaples_animal -3.758e-01 1.439e+00 -0.261 0.794168
## nonstaples_other 7.504e+00 6.553e-01 11.451 < 2e-16 ***
## calperg_food_w_calorie -1.687e-05 1.738e-05 -0.970 0.332545
## log(GDP_pcap_thous2015USD_FAO) -1.229e-03 3.395e-03 -0.362 0.717640
## year -2.126e-03 2.126e-03 -1.000 0.317926
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06962 on 361 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9431, Adjusted R-squared: 0.9421
## F-statistic: 997.1 on 6 and 361 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -4.110074e+00 1.271980e+01
## staples -1.794519e+00 -4.964772e-01
## nonstaples_animal -3.206681e+00 2.454995e+00
## nonstaples_other 6.214969e+00 8.792370e+00
## calperg_food_w_calorie -5.105145e-05 1.731786e-05
## log(GDP_pcap_thous2015USD_FAO) -7.904921e-03 5.447688e-03
## year -6.306992e-03 2.054616e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32282 -0.01675 0.00048 0.00985 0.40702
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.311e+00 4.278e+00 1.008 0.314351
## staples -1.150e+00 3.195e-01 -3.599 0.000364 ***
## nonstaples_animal -3.630e-01 1.402e+00 -0.259 0.795794
## nonstaples_other 7.500e+00 6.447e-01 11.632 < 2e-16 ***
## calperg_food_w_calorie -1.676e-05 1.738e-05 -0.964 0.335578
## GDP_pcap_thous2015USD_FAO -8.606e-05 1.777e-04 -0.484 0.628533
## year -2.130e-03 2.126e-03 -1.002 0.317044
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06961 on 361 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9431, Adjusted R-squared: 0.9422
## F-statistic: 997.4 on 6 and 361 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -4.102997e+00 1.272416e+01
## staples -1.778014e+00 -5.215397e-01
## nonstaples_animal -3.119219e+00 2.393254e+00
## nonstaples_other 6.231791e+00 8.767631e+00
## calperg_food_w_calorie -5.094721e-05 1.742402e-05
## GDP_pcap_thous2015USD_FAO -4.355843e-04 2.634643e-04
## year -6.309785e-03 2.050375e-03
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32806 -0.01683 0.00254 0.00767 0.40905
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -1.147e+00 3.300e-01 -3.476 0.000572 ***
## nonstaples_animal -3.644e-01 1.439e+00 -0.253 0.800311
## nonstaples_other 7.497e+00 6.553e-01 11.441 < 2e-16 ***
## calperg_food_w_calorie -1.651e-05 1.738e-05 -0.950 0.342819
## log(GDP_pcap_thous2015USD_FAO) -1.251e-03 3.395e-03 -0.368 0.712811
## year 1.255e-05 1.484e-05 0.846 0.398131
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06962 on 362 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9495, Adjusted R-squared: 0.9487
## F-statistic: 1135 on 6 and 362 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -1.796064e+00 -4.980263e-01
## nonstaples_animal -3.195144e+00 2.466397e+00
## nonstaples_other 6.208280e+00 8.785566e+00
## calperg_food_w_calorie -5.068586e-05 1.766958e-05
## log(GDP_pcap_thous2015USD_FAO) -7.926807e-03 5.425624e-03
## year -1.662449e-05 4.172549e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44204 -0.04047 -0.02186 0.00057 0.69133
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.242e+00 3.117e-02 39.834 < 2e-16 ***
## calperg_food_w_calorie 4.149e-05 2.954e-05 1.405 0.160960
## log(GDP_pcap_thous2015USD_FAO) 1.935e-02 5.450e-03 3.550 0.000436 ***
## year -4.365e-05 2.601e-05 -1.679 0.094099 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1245 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8376, Adjusted R-squared: 0.8359
## F-statistic: 469.5 on 4 and 364 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.180390e+00 1.302989e+00
## calperg_food_w_calorie -1.659522e-05 9.958509e-05
## log(GDP_pcap_thous2015USD_FAO) 8.629702e-03 3.006500e-02
## year -9.479795e-05 7.488963e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43393 -0.04159 -0.02154 -0.00018 0.65111
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.266e+00 3.105e-02 40.769 < 2e-16 ***
## staples_frac -4.406e-01 1.060e-01 -4.155 4.06e-05 ***
## calperg_food_w_calorie 7.427e-05 2.996e-05 2.479 0.0136 *
## log(GDP_pcap_thous2015USD_FAO) -1.131e-02 9.104e-03 -1.242 0.2149
## year 5.779e-05 3.526e-05 1.639 0.1021
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1218 on 363 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.845, Adjusted R-squared: 0.8429
## F-statistic: 395.8 on 5 and 363 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.204899e+00 1.3270294099
## staples_frac -6.490751e-01 -0.2320364052
## calperg_food_w_calorie 1.535715e-05 0.0001331854
## log(GDP_pcap_thous2015USD_FAO) -2.921461e-02 0.0065919793
## year -1.155895e-05 0.0001271383
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43339 -0.04127 -0.02146 -0.00038 0.65096
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.266e+00 3.105e-02 40.772 < 2e-16 ***
## nonstaples_frac 4.409e-01 1.060e-01 4.160 3.98e-05 ***
## calperg_food_w_calorie 7.427e-05 2.995e-05 2.479 0.0136 *
## log(GDP_pcap_thous2015USD_FAO) -1.134e-02 9.102e-03 -1.246 0.2137
## year -1.612e-04 3.802e-05 -4.239 2.85e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1218 on 363 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.845, Adjusted R-squared: 0.8429
## F-statistic: 395.9 on 5 and 363 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.204920e+00 1.327041e+00
## nonstaples_frac 2.324921e-01 6.493929e-01
## calperg_food_w_calorie 1.536328e-05 1.331751e-04
## log(GDP_pcap_thous2015USD_FAO) -2.923459e-02 6.562046e-03
## year -2.359669e-04 -8.642022e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31095 -0.01587 -0.00499 0.00937 0.42896
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 5.046e+00 1.431e-01 35.250 <2e-16 ***
## staples_frac -4.719e-02 6.349e-02 -0.743 0.4578
## calperg_food_w_calorie 7.089e-06 1.763e-05 0.402 0.6878
## log(GDP_pcap_thous2015USD_FAO) -8.916e-03 5.302e-03 -1.682 0.0935 .
## year 1.397e-05 2.060e-05 0.678 0.4982
## PKcal:staples_frac -7.322e+00 2.750e-01 -26.619 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07094 on 362 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9476, Adjusted R-squared: 0.9467
## F-statistic: 1091 on 6 and 362 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 4.764299e+00 5.327288e+00
## staples_frac -1.720420e-01 7.765740e-02
## calperg_food_w_calorie -2.757366e-05 4.175192e-05
## log(GDP_pcap_thous2015USD_FAO) -1.934254e-02 1.510601e-03
## year -2.654288e-05 5.447946e-05
## PKcal:staples_frac -7.862424e+00 -6.780647e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085660 -0.007330 0.001102 0.005967 0.098539
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef -1.409e+00 4.361e+00 -0.323 0.746856
## Corn -7.851e+00 6.784e-01 -11.572 < 2e-16 ***
## Dairy 1.403e+01 2.091e+00 6.707 8.18e-11 ***
## FiberCrop 7.208e+01 1.139e+01 6.331 7.63e-10 ***
## Fruits -6.142e+00 3.021e+00 -2.033 0.042805 *
## Legumes 3.879e+01 4.911e+00 7.898 3.88e-14 ***
## MiscCrop -1.115e+01 9.940e+00 -1.121 0.262924
## NutsSeeds -3.056e+00 3.982e+00 -0.767 0.443392
## OilCrop -5.340e+00 1.169e+00 -4.570 6.82e-06 ***
## OilPalm -1.201e+01 3.141e+00 -3.823 0.000156 ***
## OtherGrain -4.341e+00 1.958e+00 -2.217 0.027288 *
## OtherMeat_Fish -3.263e+00 3.800e+00 -0.859 0.391086
## Poultry 1.226e+01 2.941e+00 4.170 3.86e-05 ***
## Rice 6.959e+00 5.568e-01 12.499 < 2e-16 ***
## RootTuber -2.803e+00 1.286e+00 -2.180 0.029945 *
## SheepGoat 4.932e+01 1.371e+01 3.597 0.000369 ***
## Soybean -5.702e+00 1.628e+00 -3.503 0.000522 ***
## SugarCrop 9.926e+00 1.553e+00 6.391 5.38e-10 ***
## Vegetables -1.427e+01 3.785e+00 -3.769 0.000193 ***
## Wheat -8.434e-01 4.577e-01 -1.843 0.066240 .
## NEC 5.280e+00 1.330e+00 3.970 8.74e-05 ***
## Pork -1.205e+00 1.473e+00 -0.818 0.413923
## calperg_food_w_calorie -6.708e-06 6.166e-06 -1.088 0.277376
## log(GDP_pcap_thous2015USD_FAO) 2.207e-03 1.186e-03 1.861 0.063645 .
## year 1.830e-06 5.262e-06 0.348 0.728253
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01922 on 343 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9964, Adjusted R-squared: 0.9961
## F-statistic: 3750 on 25 and 343 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -9.987153e+00 7.169340e+00
## Corn -9.185515e+00 -6.516635e+00
## Dairy 9.914073e+00 1.814095e+01
## FiberCrop 4.968560e+01 9.447231e+01
## Fruits -1.208424e+01 -2.002010e-01
## Legumes 2.912823e+01 4.844844e+01
## MiscCrop -3.069581e+01 8.404433e+00
## NutsSeeds -1.088755e+01 4.776430e+00
## OilCrop -7.638943e+00 -3.041810e+00
## OilPalm -1.818817e+01 -5.831438e+00
## OtherGrain -8.192130e+00 -4.894364e-01
## OtherMeat_Fish -1.073727e+01 4.210977e+00
## Poultry 6.480079e+00 1.804976e+01
## Rice 5.864230e+00 8.054651e+00
## RootTuber -5.331397e+00 -2.738313e-01
## SheepGoat 2.235425e+01 7.628594e+01
## Soybean -8.903331e+00 -2.499931e+00
## SugarCrop 6.870886e+00 1.298049e+01
## Vegetables -2.171195e+01 -6.822416e+00
## Wheat -1.743631e+00 5.686078e-02
## NEC 2.664384e+00 7.895786e+00
## Pork -4.101563e+00 1.692081e+00
## calperg_food_w_calorie -1.883643e-05 5.419590e-06
## log(GDP_pcap_thous2015USD_FAO) -1.260017e-04 4.540268e-03
## year -8.520845e-06 1.218073e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46373 -0.04448 -0.02432 -0.00697 0.75589
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.626e-06 4.644e-08 35.019 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.111e-02 6.054e-03 3.486 0.00055 ***
## year -6.450e-06 8.201e-06 -0.786 0.43209
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1386 on 365 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.7982, Adjusted R-squared: 0.7965
## F-statistic: 481.1 on 3 and 365 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.534915e-06 1.717559e-06
## log(GDP_pcap_thous2015USD_FAO) 9.199487e-03 3.301097e-02
## year -2.257732e-05 9.677198e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36470 -0.01201 -0.00037 0.00340 0.57364
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -2.759e-07 8.148e-08 -3.386 0.000788 ***
## Feed_Kt 7.377e-06 2.963e-07 24.892 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.838e-04 3.782e-03 0.075 0.940214
## year -1.949e-06 4.999e-06 -0.390 0.696840
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08445 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9253, Adjusted R-squared: 0.9245
## F-statistic: 1127 on 4 and 364 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -4.360953e-07 -1.156288e-07
## Feed_Kt 6.793992e-06 7.959525e-06
## log(GDP_pcap_thous2015USD_FAO) -7.152928e-03 7.720581e-03
## year -1.177970e-05 7.881482e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.39327 -0.01284 -0.00182 0.00207 0.58286
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -1.415e-01 7.074e-02 -2.001 0.0461 *
## Feed_Kt 7.101e-06 3.483e-07 20.389 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.365e-03 3.822e-03 0.357 0.7212
## year -2.289e-06 5.058e-06 -0.453 0.6512
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0853 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9238, Adjusted R-squared: 0.923
## F-statistic: 1103 on 4 and 364 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -2.806558e-01 -2.443307e-03
## Feed_Kt 6.416139e-06 7.785890e-06
## log(GDP_pcap_thous2015USD_FAO) -6.150586e-03 8.880621e-03
## year -1.223580e-05 7.658061e-06
## png
## 2
plot_ly(comb_data_sel_3) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_3) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
Mean-centered.
# mean-center GDP per capita, food production, and calories per g
comb_data_sel_3_cent <- comb_data_sel_3 %>%
ungroup() %>%
mutate(PKcal = PKcal - mean(PKcal),
calperg_food_w_calorie = calperg_food_w_calorie - mean(calperg_food_w_calorie),
GDP_pcap_thous2015USD_FAO = GDP_pcap_thous2015USD_FAO - mean(GDP_pcap_thous2015USD_FAO, na.rm = TRUE),
GDP_pcap_thous2015USD_calc = GDP_pcap_thous2015USD_calc - mean(GDP_pcap_thous2015USD_calc, na.rm = TRUE))
calc_lin_model_food_en_use_production(comb_data_sel_3_cent, "3cent")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.45198 -0.03024 -0.02595 -0.01374 0.69187
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.103122 0.006494 15.88 <2e-16 ***
## PKcal 1.234880 0.031067 39.75 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1256 on 372 degrees of freedom
## Multiple R-squared: 0.8094, Adjusted R-squared: 0.8089
## F-statistic: 1580 on 1 and 372 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.34886 0.07289 0.07717 0.08938 0.79500
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.23488 0.04019 30.73 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1625 on 373 degrees of freedom
## Multiple R-squared: 0.7168, Adjusted R-squared: 0.7161
## F-statistic: 944.2 on 1 and 373 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44929 -0.03202 -0.02195 -0.01292 0.69000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.031e-01 6.493e-03 15.883 <2e-16 ***
## PKcal 1.240e+00 3.143e-02 39.451 <2e-16 ***
## calperg_food_w_calorie 3.107e-05 2.948e-05 1.054 0.293
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1256 on 371 degrees of freedom
## Multiple R-squared: 0.81, Adjusted R-squared: 0.809
## F-statistic: 790.8 on 2 and 371 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44377 -0.03509 -0.01837 -0.00422 0.69683
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.038e-01 6.524e-03 15.913 < 2e-16 ***
## PKcal 1.245e+00 3.136e-02 39.685 < 2e-16 ***
## calperg_food_w_calorie 3.815e-05 2.965e-05 1.287 0.19895
## GDP_pcap_thous2015USD_FAO 8.855e-04 2.968e-04 2.983 0.00305 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1251 on 364 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8146, Adjusted R-squared: 0.8131
## F-statistic: 533.2 on 3 and 364 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.097025 -0.031783 0.000461 0.030347 0.145342
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.178e-01 1.032e-02 11.422 < 2e-16 ***
## PKcal 2.644e+00 4.389e-02 60.228 < 2e-16 ***
## calperg_food_w_calorie -1.184e-04 3.655e-05 -3.240 0.00156 **
## log(GDP_pcap_thous2015USD_FAO) 9.496e-03 3.305e-03 2.873 0.00484 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04393 on 115 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9702, Adjusted R-squared: 0.9694
## F-statistic: 1246 on 3 and 115 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44402 -0.03507 -0.02041 -0.00510 0.69447
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.042e-01 6.639e-03 15.695 < 2e-16 ***
## PKcal 1.245e+00 3.173e-02 39.244 < 2e-16 ***
## calperg_food_w_calorie 3.753e-05 3.004e-05 1.249 0.21237
## GDP_pcap_thous2015USD_calc 7.380e-04 2.650e-04 2.785 0.00564 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1263 on 358 degrees of freedom
## (12 observations deleted due to missingness)
## Multiple R-squared: 0.8138, Adjusted R-squared: 0.8123
## F-statistic: 521.7 on 3 and 358 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.091841 -0.037819 0.007508 0.027902 0.154258
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.11540 0.01070 10.784 < 2e-16 ***
## PKcal 2.61713 0.04486 58.345 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.01023 0.00343 2.984 0.00347 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04569 on 116 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9674, Adjusted R-squared: 0.9669
## F-statistic: 1723 on 2 and 116 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.08626 -0.03907 0.01519 0.02309 0.15657
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.1429498 0.0047107 30.346 <2e-16 ***
## PKcal 2.1848951 0.2202894 9.918 <2e-16 ***
## PKcal:calperg_food_w_calorie 0.0001415 0.0007983 0.177 0.8596
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.1288255 0.0627301 2.054 0.0423 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04677 on 115 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9662, Adjusted R-squared: 0.9653
## F-statistic: 1095 on 3 and 115 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.10161 -0.01003 -0.00501 0.00763 0.10570
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.397e-03 1.260e-02 -0.111 0.911909
## PKcal -1.529e-01 2.503e-01 -0.611 0.542582
## calperg_food_w_calorie -1.273e-04 3.374e-05 -3.774 0.000258 ***
## log(GDP_pcap_thous2015USD_FAO) 4.884e-02 3.918e-03 12.467 < 2e-16 ***
## PKcal:calperg_food_w_calorie -1.586e-03 6.840e-04 -2.318 0.022240 *
## PKcal:log(GDP_pcap_thous2015USD_FAO) 8.232e-01 7.068e-02 11.648 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02806 on 113 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.988, Adjusted R-squared: 0.9875
## F-statistic: 1865 on 5 and 113 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -0.0263666085 2.357174e-02
## PKcal -0.6486978163 3.429800e-01
## calperg_food_w_calorie -0.0001941613 -6.047314e-05
## log(GDP_pcap_thous2015USD_FAO) 0.0410805837 5.660346e-02
## PKcal:calperg_food_w_calorie -0.0029405778 -2.304781e-04
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.6832259748 9.632692e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.093847 -0.029450 0.001593 0.030098 0.142178
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.638e+00 4.718e+00 0.559 0.57713
## PKcal 2.643e+00 4.403e-02 60.036 < 2e-16 ***
## calperg_food_w_calorie -1.164e-04 3.686e-05 -3.158 0.00203 **
## log(GDP_pcap_thous2015USD_FAO) 9.661e-03 3.330e-03 2.901 0.00446 **
## year -1.252e-03 2.345e-03 -0.534 0.59424
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04407 on 114 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9702, Adjusted R-squared: 0.9692
## F-statistic: 928.7 on 4 and 114 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -6.7074051973 11.9833486469
## PKcal 2.5562311648 2.7306822596
## calperg_food_w_calorie -0.0001893979 -0.0000433744
## log(GDP_pcap_thous2015USD_FAO) 0.0030645274 0.0162569437
## year -0.0058970469 0.0033920639
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.043992 -0.001429 0.000185 0.001440 0.050166
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.336e+00 1.078e+00 -1.240 0.21827
## PKcal -1.627e+00 4.929e-01 -3.301 0.00137 **
## calperg_food_w_calorie -3.254e-05 3.340e-05 -0.974 0.33238
## log(GDP_pcap_thous2015USD_FAO) 5.213e-04 4.668e-03 0.112 0.91131
## year 7.096e-04 5.346e-04 1.327 0.18769
## country_nameAustria -1.425e-01 1.262e-02 -11.294 < 2e-16 ***
## country_nameBelgium -1.057e-01 1.108e-02 -9.534 1.98e-15 ***
## country_nameCanada -5.844e-02 1.111e-02 -5.260 9.18e-07 ***
## country_nameCyprus -1.867e-01 1.743e-02 -10.709 < 2e-16 ***
## country_nameDenmark -1.562e-01 1.186e-02 -13.172 < 2e-16 ***
## country_nameFinland -1.698e-01 1.209e-02 -14.042 < 2e-16 ***
## country_nameGermany 1.880e-01 3.929e-02 4.784 6.43e-06 ***
## country_nameGreece -1.474e-01 1.855e-02 -7.946 4.40e-12 ***
## country_nameIceland -1.936e-01 1.463e-02 -13.239 < 2e-16 ***
## country_nameIreland -1.671e-01 1.194e-02 -13.998 < 2e-16 ***
## country_nameItaly 5.277e-02 2.660e-02 1.984 0.05024 .
## country_nameJapan 2.529e-01 4.854e-02 5.210 1.13e-06 ***
## country_nameKorea, Republic of -1.657e-02 1.875e-02 -0.884 0.37912
## country_nameLuxembourg -1.977e-01 1.588e-02 -12.450 < 2e-16 ***
## country_nameNetherlands -8.150e-02 6.622e-03 -12.306 < 2e-16 ***
## country_nameNorway -1.698e-01 1.222e-02 -13.896 < 2e-16 ***
## country_nameSlovenia -1.847e-01 3.052e-02 -6.050 3.01e-08 ***
## country_nameSpain -1.891e-02 1.701e-02 -1.112 0.26912
## country_nameSwitzerland -1.541e-01 1.186e-02 -12.989 < 2e-16 ***
## country_nameUnited Kingdom 3.802e-02 2.680e-02 1.419 0.15935
## country_nameUnited States of America 1.667e+00 1.964e-01 8.489 3.20e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.008756 on 93 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.999, Adjusted R-squared: 0.9988
## F-statistic: 3876 on 25 and 93 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.477373e+00 8.046045e-01
## PKcal -2.605705e+00 -6.482116e-01
## calperg_food_w_calorie -9.886720e-05 3.377942e-05
## log(GDP_pcap_thous2015USD_FAO) -8.747789e-03 9.790411e-03
## year -3.521184e-04 1.771271e-03
## country_nameAustria -1.675453e-01 -1.174390e-01
## country_nameBelgium -1.276585e-01 -8.364638e-02
## country_nameCanada -8.050030e-02 -3.637457e-02
## country_nameCyprus -2.213125e-01 -1.520754e-01
## country_nameDenmark -1.797520e-01 -1.326543e-01
## country_nameFinland -1.938414e-01 -1.458091e-01
## country_nameGermany 1.099585e-01 2.660141e-01
## country_nameGreece -1.842026e-01 -1.105405e-01
## country_nameIceland -2.226829e-01 -1.645918e-01
## country_nameIreland -1.907820e-01 -1.433779e-01
## country_nameItaly -5.706407e-05 1.056047e-01
## country_nameJapan 1.565064e-01 3.493047e-01
## country_nameKorea, Republic of -5.381346e-02 2.066761e-02
## country_nameLuxembourg -2.292609e-01 -1.661882e-01
## country_nameNetherlands -9.464676e-02 -6.834574e-02
## country_nameNorway -1.940838e-01 -1.455501e-01
## country_nameSlovenia -2.452693e-01 -1.240431e-01
## country_nameSpain -5.269262e-02 1.486910e-02
## country_nameSwitzerland -1.776114e-01 -1.305050e-01
## country_nameUnited Kingdom -1.520020e-02 9.123796e-02
## country_nameUnited States of America 1.277212e+00 2.057225e+00
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.056277 -0.020208 -0.002236 0.014770 0.126075
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.310e+00 3.571e+00 0.927 0.3560
## staples -2.606e+00 5.643e-01 -4.618 1.04e-05 ***
## nonstaples_animal 7.920e-01 1.268e+00 0.625 0.5335
## nonstaples_other 7.227e+00 9.045e-01 7.989 1.32e-12 ***
## calperg_food_w_calorie -1.697e-05 2.992e-05 -0.567 0.5716
## log(GDP_pcap_thous2015USD_FAO) 6.239e-03 2.572e-03 2.426 0.0169 *
## year -1.653e-03 1.775e-03 -0.931 0.3537
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03334 on 112 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9833, Adjusted R-squared: 0.9824
## F-statistic: 1096 on 6 and 112 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.765127e+00 1.038453e+01
## staples -3.724260e+00 -1.488112e+00
## nonstaples_animal -1.720638e+00 3.304613e+00
## nonstaples_other 5.434412e+00 9.018858e+00
## calperg_food_w_calorie -7.625032e-05 4.230243e-05
## log(GDP_pcap_thous2015USD_FAO) 1.142633e-03 1.133601e-02
## year -5.168796e-03 1.863264e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32282 -0.01675 0.00048 0.00985 0.40702
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.281e+00 4.278e+00 1.001 0.317630
## staples -1.150e+00 3.195e-01 -3.599 0.000364 ***
## nonstaples_animal -3.630e-01 1.402e+00 -0.259 0.795794
## nonstaples_other 7.500e+00 6.447e-01 11.632 < 2e-16 ***
## calperg_food_w_calorie -1.676e-05 1.738e-05 -0.964 0.335578
## GDP_pcap_thous2015USD_FAO -8.606e-05 1.777e-04 -0.484 0.628533
## year -2.130e-03 2.126e-03 -1.002 0.317044
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06961 on 361 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9431, Adjusted R-squared: 0.9422
## F-statistic: 997.4 on 6 and 361 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -4.131675e+00 1.269358e+01
## staples -1.778014e+00 -5.215397e-01
## nonstaples_animal -3.119219e+00 2.393254e+00
## nonstaples_other 6.231791e+00 8.767631e+00
## calperg_food_w_calorie -5.094721e-05 1.742402e-05
## GDP_pcap_thous2015USD_FAO -4.355843e-04 2.634643e-04
## year -6.309785e-03 2.050375e-03
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.055806 -0.021810 -0.000823 0.013462 0.130264
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -2.593e+00 5.638e-01 -4.599 1.11e-05 ***
## nonstaples_animal 7.964e-01 1.267e+00 0.628 0.5310
## nonstaples_other 7.216e+00 9.039e-01 7.983 1.31e-12 ***
## calperg_food_w_calorie -1.987e-05 2.973e-05 -0.668 0.5053
## log(GDP_pcap_thous2015USD_FAO) 6.037e-03 2.561e-03 2.357 0.0202 *
## year -7.924e-06 4.183e-06 -1.894 0.0607 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03332 on 113 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9863, Adjusted R-squared: 0.9856
## F-statistic: 1355 on 6 and 113 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -3.709858e+00 -1.476036e+00
## nonstaples_animal -1.714448e+00 3.307151e+00
## nonstaples_other 5.424968e+00 9.006532e+00
## calperg_food_w_calorie -7.878153e-05 3.903704e-05
## log(GDP_pcap_thous2015USD_FAO) 9.620681e-04 1.111124e-02
## year -1.621134e-05 3.634175e-07
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.097173 -0.031885 0.000484 0.030499 0.145491
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.644e+00 4.390e-02 60.221 < 2e-16 ***
## calperg_food_w_calorie -1.185e-04 3.655e-05 -3.242 0.00155 **
## log(GDP_pcap_thous2015USD_FAO) 9.492e-03 3.306e-03 2.871 0.00487 **
## year 5.855e-05 5.127e-06 11.420 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04393 on 115 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9757, Adjusted R-squared: 0.9749
## F-statistic: 1157 on 4 and 115 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.556663e+00 2.730572e+00
## calperg_food_w_calorie -1.909014e-04 -4.609484e-05
## log(GDP_pcap_thous2015USD_FAO) 2.943405e-03 1.604119e-02
## year 4.839415e-05 6.870569e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.083509 -0.023044 0.005177 0.027073 0.139492
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.625e+00 4.101e-02 64.014 < 2e-16 ***
## staples_frac -3.600e-01 8.224e-02 -4.377 2.68e-05 ***
## calperg_food_w_calorie -9.470e-05 3.440e-05 -2.753 0.00688 **
## log(GDP_pcap_thous2015USD_FAO) 1.033e-03 3.630e-03 0.285 0.77652
## year 1.314e-04 1.732e-05 7.588 9.61e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04083 on 114 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9792, Adjusted R-squared: 0.9783
## F-statistic: 1075 on 5 and 114 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.544023e+00 2.706507e+00
## staples_frac -5.229036e-01 -1.970503e-01
## calperg_food_w_calorie -1.628468e-04 -2.654876e-05
## log(GDP_pcap_thous2015USD_FAO) -6.157914e-03 8.223516e-03
## year 9.713373e-05 1.657736e-04
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.08303 -0.02343 0.00497 0.02697 0.13903
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.625e+00 4.099e-02 64.037 < 2e-16 ***
## nonstaples_frac 3.607e-01 8.219e-02 4.389 2.56e-05 ***
## calperg_food_w_calorie -9.436e-05 3.440e-05 -2.743 0.00707 **
## log(GDP_pcap_thous2015USD_FAO) 1.038e-03 3.625e-03 0.286 0.77521
## year -4.768e-05 2.467e-05 -1.933 0.05574 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04081 on 114 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9792, Adjusted R-squared: 0.9783
## F-statistic: 1076 on 5 and 114 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.543994e+00 2.706415e+00
## nonstaples_frac 1.979217e-01 5.235710e-01
## calperg_food_w_calorie -1.625003e-04 -2.621587e-05
## log(GDP_pcap_thous2015USD_FAO) -6.144104e-03 8.219612e-03
## year -9.654294e-05 1.188436e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.067195 -0.014139 0.000963 0.014735 0.124100
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 4.636e+00 3.007e-01 15.421 < 2e-16 ***
## staples_frac -3.791e-01 6.984e-02 -5.428 3.30e-07 ***
## calperg_food_w_calorie -2.373e-05 3.103e-05 -0.765 0.4461
## log(GDP_pcap_thous2015USD_FAO) 5.963e-03 3.166e-03 1.884 0.0622 .
## year 1.247e-04 1.473e-05 8.464 1.06e-13 ***
## PKcal:staples_frac -6.749e+00 1.002e+00 -6.734 7.21e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03464 on 113 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9852, Adjusted R-squared: 0.9844
## F-statistic: 1252 on 6 and 113 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 4.040639e+00 5.231925e+00
## staples_frac -5.174410e-01 -2.407042e-01
## calperg_food_w_calorie -8.520997e-05 3.775603e-05
## log(GDP_pcap_thous2015USD_FAO) -3.092027e-04 1.223441e-02
## year 9.551987e-05 1.539005e-04
## PKcal:staples_frac -8.734547e+00 -4.763444e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.027129 -0.006013 0.001119 0.005276 0.026391
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 1.322e+01 9.224e+00 1.433 0.155081
## Corn 6.468e+00 9.853e+00 0.656 0.513182
## Dairy 4.181e+01 3.506e+00 11.926 < 2e-16 ***
## FiberCrop 1.258e+02 2.405e+01 5.228 1.03e-06 ***
## Fruits -2.330e+01 1.000e+01 -2.330 0.021951 *
## Legumes 1.811e+01 1.083e+01 1.672 0.097885 .
## MiscCrop -7.350e+00 1.311e+01 -0.560 0.576513
## NutsSeeds -2.346e+01 1.464e+01 -1.603 0.112349
## OilCrop 4.344e-01 2.403e+00 0.181 0.856958
## OilPalm 1.027e+01 9.673e+00 1.062 0.291035
## OtherGrain -1.940e+00 6.175e+00 -0.314 0.754130
## OtherMeat_Fish 3.397e+01 9.500e+00 3.575 0.000554 ***
## Poultry 2.736e+01 7.201e+00 3.799 0.000257 ***
## Rice 1.854e+00 1.565e+00 1.184 0.239287
## RootTuber -7.495e-01 7.654e+00 -0.098 0.922194
## SheepGoat -9.206e+01 2.385e+01 -3.859 0.000208 ***
## Soybean -2.949e+00 4.587e+00 -0.643 0.521910
## SugarCrop -5.009e+00 4.840e+00 -1.035 0.303422
## Vegetables -3.416e+00 1.280e+01 -0.267 0.790161
## Wheat -8.374e+00 2.140e+00 -3.914 0.000172 ***
## NEC -1.003e+01 4.545e+00 -2.207 0.029752 *
## Pork -9.682e+00 5.608e+00 -1.726 0.087561 .
## calperg_food_w_calorie 2.870e-05 1.514e-05 1.896 0.061040 .
## log(GDP_pcap_thous2015USD_FAO) -3.366e-05 1.065e-03 -0.032 0.974852
## year 1.338e-06 1.645e-06 0.814 0.417834
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01135 on 94 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9987, Adjusted R-squared: 0.9983
## F-statistic: 2840 on 25 and 94 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -5.093440e+00 3.153560e+01
## Corn -1.309636e+01 2.603137e+01
## Dairy 3.485208e+01 4.877419e+01
## FiberCrop 7.800269e+01 1.735231e+02
## Fruits -4.315477e+01 -3.443956e+00
## Legumes -3.398703e+00 3.962421e+01
## MiscCrop -3.338893e+01 1.868922e+01
## NutsSeeds -5.253268e+01 5.604150e+00
## OilCrop -4.337636e+00 5.206439e+00
## OilPalm -8.934613e+00 2.947598e+01
## OtherGrain -1.420118e+01 1.032161e+01
## OtherMeat_Fish 1.510451e+01 5.283047e+01
## Poultry 1.306008e+01 4.165427e+01
## Rice -1.254227e+00 4.961868e+00
## RootTuber -1.594610e+01 1.444701e+01
## SheepGoat -1.394214e+02 -4.469767e+01
## Soybean -1.205616e+01 6.158997e+00
## SugarCrop -1.461974e+01 4.602008e+00
## Vegetables -2.882811e+01 2.199705e+01
## Wheat -1.262211e+01 -4.125523e+00
## NEC -1.905583e+01 -1.006431e+00
## Pork -2.081639e+01 1.453155e+00
## calperg_food_w_calorie -1.356181e-06 5.875713e-05
## log(GDP_pcap_thous2015USD_FAO) -2.148238e-03 2.080913e-03
## year -1.927074e-06 4.603726e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.101159 -0.036118 0.009311 0.025264 0.134252
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 4.435e-06 7.147e-08 62.061 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.043e-02 3.231e-03 3.229 0.00162 **
## year -2.229e-05 5.054e-06 -4.410 2.33e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04304 on 116 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9765, Adjusted R-squared: 0.9759
## F-statistic: 1608 on 3 and 116 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 4.293838e-06 4.576941e-06
## log(GDP_pcap_thous2015USD_FAO) 4.033501e-03 1.683154e-02
## year -3.229605e-05 -1.227599e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.074565 -0.034540 0.003986 0.018223 0.130841
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 2.835e-06 2.980e-07 9.516 3.48e-16 ***
## Feed_Kt 2.532e-06 4.604e-07 5.498 2.34e-07 ***
## log(GDP_pcap_thous2015USD_FAO) 8.216e-03 2.915e-03 2.818 0.005690 **
## year -1.824e-05 4.576e-06 -3.985 0.000119 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03846 on 115 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9814, Adjusted R-squared: 0.9808
## F-statistic: 1518 on 4 and 115 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 2.245048e-06 3.425414e-06
## Feed_Kt 1.619659e-06 3.443780e-06
## log(GDP_pcap_thous2015USD_FAO) 2.440850e-03 1.399064e-02
## year -2.730289e-05 -9.172931e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.071946 -0.029038 0.002029 0.018089 0.141265
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.533e+00 1.642e-01 9.335 9.18e-16 ***
## Feed_Kt 2.913e-06 4.293e-07 6.785 5.32e-10 ***
## log(GDP_pcap_thous2015USD_FAO) 7.755e-03 2.935e-03 2.643 0.00937 **
## year 2.897e-05 6.153e-06 4.709 7.02e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03879 on 115 degrees of freedom
## (255 observations deleted due to missingness)
## Multiple R-squared: 0.9811, Adjusted R-squared: 0.9804
## F-statistic: 1492 on 4 and 115 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.207840e+00 1.858471e+00
## Feed_Kt 2.062480e-06 3.763251e-06
## log(GDP_pcap_thous2015USD_FAO) 1.941957e-03 1.356783e-02
## year 1.678489e-05 4.116122e-05
## png
## 2
comb_data_sel_4 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_all_inonspec)
calc_lin_model_food_en_use_production(comb_data_sel_4, "4")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74955 -0.03152 -0.02519 -0.00834 0.78068
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.030988 0.002755 11.25 <2e-16 ***
## PKcal 1.013260 0.014979 67.65 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1165 on 1990 degrees of freedom
## Multiple R-squared: 0.6969, Adjusted R-squared: 0.6968
## F-statistic: 4576 on 1 and 1990 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.79852 -0.00071 0.00501 0.02131 0.78937
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.06693 0.01464 72.88 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1202 on 1991 degrees of freedom
## Multiple R-squared: 0.7274, Adjusted R-squared: 0.7272
## F-statistic: 5312 on 1 and 1991 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75260 -0.03239 -0.02471 -0.00699 0.77883
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.359e-02 1.955e-02 3.253 0.00116 **
## PKcal 1.013e+00 1.498e-02 67.614 < 2e-16 ***
## calperg_food_w_calorie -1.832e-05 1.087e-05 -1.685 0.09218 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1165 on 1989 degrees of freedom
## Multiple R-squared: 0.6974, Adjusted R-squared: 0.6971
## F-statistic: 2292 on 2 and 1989 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74429 -0.03317 -0.02158 -0.00410 0.75075
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.114e-02 2.160e-02 1.905 0.057 .
## PKcal 1.014e+00 1.532e-02 66.213 < 2e-16 ***
## calperg_food_w_calorie -1.217e-05 1.174e-05 -1.037 0.300
## GDP_pcap_thous2015USD_FAO 7.471e-04 1.457e-04 5.128 3.24e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1187 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7006, Adjusted R-squared: 0.7001
## F-statistic: 1467 on 3 and 1881 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73574 -0.03963 -0.01810 0.00093 0.74694
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.162e-03 2.300e-02 -0.181 0.856
## PKcal 1.018e+00 1.522e-02 66.866 < 2e-16 ***
## calperg_food_w_calorie -2.009e-06 1.181e-05 -0.170 0.865
## log(GDP_pcap_thous2015USD_FAO) 1.773e-02 2.401e-03 7.383 2.32e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1179 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7049, Adjusted R-squared: 0.7045
## F-statistic: 1498 on 3 and 1881 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74559 -0.03271 -0.02180 -0.00462 0.75946
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.184e-02 2.100e-02 1.516 0.130
## PKcal 1.016e+00 1.513e-02 67.170 < 2e-16 ***
## calperg_food_w_calorie -6.939e-06 1.134e-05 -0.612 0.541
## GDP_pcap_thous2015USD_calc 5.821e-04 1.232e-04 4.725 2.47e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1173 on 1934 degrees of freedom
## (54 observations deleted due to missingness)
## Multiple R-squared: 0.7004, Adjusted R-squared: 0.7
## F-statistic: 1507 on 3 and 1934 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73535 -0.03949 -0.01795 0.00101 0.74698
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.007936 0.006068 -1.308 0.191
## PKcal 1.017803 0.015201 66.955 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.017814 0.002346 7.594 4.87e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1178 on 1882 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7049, Adjusted R-squared: 0.7046
## F-statistic: 2248 on 2 and 1882 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.69337 -0.01876 -0.00705 0.00297 0.66039
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.436e-03 2.171e-03 3.425 0.000628 ***
## PKcal -6.595e-01 8.297e-02 -7.948 3.23e-15 ***
## PKcal:calperg_food_w_calorie 6.075e-04 4.602e-05 13.201 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.941e-01 1.137e-02 43.444 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0843 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.8491, Adjusted R-squared: 0.8489
## F-statistic: 3528 on 3 and 1881 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.71108 -0.02490 -0.01009 0.00969 0.65087
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.131e-01 1.700e-02 6.650 3.83e-11 ***
## PKcal -8.693e-01 8.727e-02 -9.961 < 2e-16 ***
## calperg_food_w_calorie -4.564e-05 8.783e-06 -5.197 2.24e-07 ***
## log(GDP_pcap_thous2015USD_FAO) -1.161e-02 1.823e-03 -6.368 2.40e-10 ***
## PKcal:calperg_food_w_calorie 7.066e-04 4.803e-05 14.711 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.252e-01 1.210e-02 43.419 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08314 on 1879 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.8534, Adjusted R-squared: 0.853
## F-statistic: 2187 on 5 and 1879 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 7.972006e-02 1.464089e-01
## PKcal -1.040500e+00 -6.981712e-01
## calperg_food_w_calorie -6.286923e-05 -2.841931e-05
## log(GDP_pcap_thous2015USD_FAO) -1.518261e-02 -8.032546e-03
## PKcal:calperg_food_w_calorie 6.123691e-04 8.007644e-04
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.014466e-01 5.488897e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73578 -0.03927 -0.01759 0.00046 0.74809
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.709e-01 4.451e-01 0.608 0.543
## PKcal 1.018e+00 1.526e-02 66.730 < 2e-16 ***
## calperg_food_w_calorie -3.275e-06 1.198e-05 -0.273 0.785
## log(GDP_pcap_thous2015USD_FAO) 1.794e-02 2.426e-03 7.395 2.11e-13 ***
## year -1.369e-04 2.213e-04 -0.619 0.536
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1179 on 1880 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.705, Adjusted R-squared: 0.7044
## F-statistic: 1123 on 4 and 1880 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -6.021678e-01 1.143877e+00
## PKcal 9.884307e-01 1.048291e+00
## calperg_food_w_calorie -2.678123e-05 2.023115e-05
## log(GDP_pcap_thous2015USD_FAO) 1.318046e-02 2.269443e-02
## year -5.708940e-04 2.970967e-04
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.71021 -0.00446 -0.00009 0.00451 0.33711
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 3.411e-01 2.697e-01
## PKcal 2.534e+00 6.591e-02
## calperg_food_w_calorie -1.310e-05 1.398e-05
## log(GDP_pcap_thous2015USD_FAO) 6.076e-03 4.623e-03
## year -1.679e-04 1.337e-04
## country_nameArmenia 2.913e-03 1.930e-02
## country_nameAustralia 4.788e-02 2.199e-02
## country_nameAustria -1.587e-02 2.355e-02
## country_nameAzerbaijan -2.357e-03 1.770e-02
## country_nameBelarus 2.737e-03 1.648e-02
## country_nameBelgium 8.975e-04 2.522e-02
## country_nameBenin -1.490e-04 2.159e-02
## country_nameBosnia and Herzegovina -3.585e-03 2.789e-02
## country_nameBotswana 5.707e-03 2.032e-02
## country_nameBrazil 8.664e-02 2.286e-02
## country_nameBulgaria -1.402e-04 1.977e-02
## country_nameCameroon -3.532e-02 2.250e-02
## country_nameCanada -7.043e-02 2.433e-02
## country_nameChile -3.465e-02 2.880e-02
## country_nameChina -2.484e+00 9.830e-02
## country_nameColombia -3.801e-02 1.791e-02
## country_nameCongo 7.178e-03 5.595e-02
## country_nameCosta Rica 8.214e-03 2.149e-02
## country_nameCote dIvoire -2.781e-02 2.664e-02
## country_nameCroatia -1.249e-04 1.948e-02
## country_nameCyprus -4.300e-03 2.030e-02
## country_nameCzech Republic -3.850e-03 2.286e-02
## country_nameDenmark 5.031e-03 2.291e-02
## country_nameDominican Republic 5.752e-03 2.006e-02
## country_nameEstonia 1.873e-03 1.787e-02
## country_nameFinland -7.605e-03 2.637e-02
## country_nameFrance -8.052e-02 2.380e-02
## country_nameGeorgia 4.709e-03 1.882e-02
## country_nameGermany -4.246e-02 2.258e-02
## country_nameGreece -2.631e-02 1.946e-02
## country_nameHungary -2.624e-03 1.986e-02
## country_nameIceland -4.618e-03 2.214e-02
## country_nameIreland -1.039e-03 2.207e-02
## country_nameItaly -1.372e-01 2.244e-02
## country_nameJapan -1.505e-01 2.322e-02
## country_nameKazakhstan -3.748e-03 1.888e-02
## country_nameKorea, Republic of -8.663e-02 2.024e-02
## country_nameKyrgyzstan 2.159e-03 1.957e-02
## country_nameLatvia 1.378e-03 1.743e-02
## country_nameLithuania 2.277e-03 1.718e-02
## country_nameLuxembourg -1.320e-02 2.604e-02
## country_nameMacedonia, the former Yugoslav Republic of 4.525e-03 1.816e-02
## country_nameMexico -2.087e-01 2.276e-02
## country_nameMoldova, Republic of 9.134e-03 1.725e-02
## country_nameMontenegro 3.297e-03 2.241e-02
## country_nameMorocco -6.212e-02 2.166e-02
## country_nameMozambique -2.425e-02 3.192e-02
## country_nameNetherlands 1.801e-02 2.120e-02
## country_nameNorway -8.326e-03 2.347e-02
## country_namePhilippines -1.082e-01 2.133e-02
## country_namePoland -3.839e-02 1.870e-02
## country_namePortugal -1.771e-02 2.022e-02
## country_nameRomania -3.628e-02 1.843e-02
## country_nameRussian Federation 4.784e-02 2.159e-02
## country_nameSenegal -3.428e-04 3.082e-02
## country_nameSerbia 4.608e-03 2.315e-02
## country_nameSlovakia -1.478e-03 2.214e-02
## country_nameSlovenia -3.869e-03 2.313e-02
## country_nameSpain -5.452e-02 1.955e-02
## country_nameSweden -1.285e-02 2.537e-02
## country_nameSwitzerland -2.606e-02 2.433e-02
## country_nameTajikistan 6.930e-03 1.835e-02
## country_nameThailand 2.093e-02 2.041e-02
## country_nameTunisia -1.905e-02 2.215e-02
## country_nameTurkey -1.724e-01 2.080e-02
## country_nameTurkmenistan 1.894e-02 2.104e-02
## country_nameUkraine -1.927e-02 1.855e-02
## country_nameUnited Kingdom -3.637e-02 2.670e-02
## country_nameUnited States of America -1.134e-01 3.807e-02
## country_nameUruguay 4.058e-03 3.588e-02
## country_nameUzbekistan -2.500e-02 2.057e-02
## country_nameVenezuela -4.493e-02 2.316e-02
## country_nameViet Nam 3.467e-03 5.654e-02
## country_nameZambia 1.158e-02 2.497e-02
## t value Pr(>|t|)
## (Intercept) 1.265 0.206007
## PKcal 38.439 < 2e-16 ***
## calperg_food_w_calorie -0.937 0.348923
## log(GDP_pcap_thous2015USD_FAO) 1.314 0.188848
## year -1.255 0.209472
## country_nameArmenia 0.151 0.880021
## country_nameAustralia 2.177 0.029581 *
## country_nameAustria -0.674 0.500379
## country_nameAzerbaijan -0.133 0.894075
## country_nameBelarus 0.166 0.868085
## country_nameBelgium 0.036 0.971611
## country_nameBenin -0.007 0.994494
## country_nameBosnia and Herzegovina -0.129 0.897740
## country_nameBotswana 0.281 0.778841
## country_nameBrazil 3.791 0.000155 ***
## country_nameBulgaria -0.007 0.994344
## country_nameCameroon -1.570 0.116565
## country_nameCanada -2.895 0.003840 **
## country_nameChile -1.203 0.228959
## country_nameChina -25.272 < 2e-16 ***
## country_nameColombia -2.122 0.033993 *
## country_nameCongo 0.128 0.897935
## country_nameCosta Rica 0.382 0.702349
## country_nameCote dIvoire -1.044 0.296600
## country_nameCroatia -0.006 0.994884
## country_nameCyprus -0.212 0.832270
## country_nameCzech Republic -0.168 0.866257
## country_nameDenmark 0.220 0.826183
## country_nameDominican Republic 0.287 0.774307
## country_nameEstonia 0.105 0.916520
## country_nameFinland -0.288 0.773116
## country_nameFrance -3.383 0.000732 ***
## country_nameGeorgia 0.250 0.802428
## country_nameGermany -1.881 0.060161 .
## country_nameGreece -1.352 0.176634
## country_nameHungary -0.132 0.894906
## country_nameIceland -0.209 0.834764
## country_nameIreland -0.047 0.962449
## country_nameItaly -6.115 1.18e-09 ***
## country_nameJapan -6.479 1.18e-10 ***
## country_nameKazakhstan -0.199 0.842647
## country_nameKorea, Republic of -4.281 1.96e-05 ***
## country_nameKyrgyzstan 0.110 0.912170
## country_nameLatvia 0.079 0.936996
## country_nameLithuania 0.133 0.894534
## country_nameLuxembourg -0.507 0.612376
## country_nameMacedonia, the former Yugoslav Republic of 0.249 0.803279
## country_nameMexico -9.172 < 2e-16 ***
## country_nameMoldova, Republic of 0.530 0.596499
## country_nameMontenegro 0.147 0.883051
## country_nameMorocco -2.868 0.004181 **
## country_nameMozambique -0.760 0.447612
## country_nameNetherlands 0.850 0.395702
## country_nameNorway -0.355 0.722824
## country_namePhilippines -5.075 4.28e-07 ***
## country_namePoland -2.053 0.040247 *
## country_namePortugal -0.876 0.381360
## country_nameRomania -1.969 0.049157 *
## country_nameRussian Federation 2.216 0.026815 *
## country_nameSenegal -0.011 0.991126
## country_nameSerbia 0.199 0.842251
## country_nameSlovakia -0.067 0.946801
## country_nameSlovenia -0.167 0.867165
## country_nameSpain -2.788 0.005352 **
## country_nameSweden -0.506 0.612734
## country_nameSwitzerland -1.071 0.284252
## country_nameTajikistan 0.378 0.705667
## country_nameThailand 1.025 0.305325
## country_nameTunisia -0.860 0.389926
## country_nameTurkey -8.286 2.25e-16 ***
## country_nameTurkmenistan 0.900 0.368124
## country_nameUkraine -1.039 0.299156
## country_nameUnited Kingdom -1.362 0.173238
## country_nameUnited States of America -2.979 0.002931 **
## country_nameUruguay 0.113 0.909947
## country_nameUzbekistan -1.216 0.224320
## country_nameVenezuela -1.940 0.052522 .
## country_nameViet Nam 0.061 0.951111
## country_nameZambia 0.464 0.642909
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05391 on 1806 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.9408, Adjusted R-squared: 0.9382
## F-statistic: 367.6 on 78 and 1806 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -1.877316e-01
## PKcal 2.404279e+00
## calperg_food_w_calorie -4.051101e-05
## log(GDP_pcap_thous2015USD_FAO) -2.989829e-03
## year -4.301645e-04
## country_nameArmenia -3.493473e-02
## country_nameAustralia 4.752101e-03
## country_nameAustria -6.205452e-02
## country_nameAzerbaijan -3.707602e-02
## country_nameBelarus -2.957772e-02
## country_nameBelgium -4.855900e-02
## country_nameBenin -4.249608e-02
## country_nameBosnia and Herzegovina -5.827949e-02
## country_nameBotswana -3.414605e-02
## country_nameBrazil 4.181498e-02
## country_nameBulgaria -3.891806e-02
## country_nameCameroon -7.945002e-02
## country_nameCanada -1.181428e-01
## country_nameChile -9.113151e-02
## country_nameChina -2.676975e+00
## country_nameColombia -7.313889e-02
## country_nameCongo -1.025603e-01
## country_nameCosta Rica -3.393338e-02
## country_nameCote dIvoire -8.006151e-02
## country_nameCroatia -3.832892e-02
## country_nameCyprus -4.411505e-02
## country_nameCzech Republic -4.867694e-02
## country_nameDenmark -3.989577e-02
## country_nameDominican Republic -3.358745e-02
## country_nameEstonia -3.317695e-02
## country_nameFinland -5.932988e-02
## country_nameFrance -1.272030e-01
## country_nameGeorgia -3.219788e-02
## country_nameGermany -8.674011e-02
## country_nameGreece -6.447546e-02
## country_nameHungary -4.157688e-02
## country_nameIceland -4.803098e-02
## country_nameIreland -4.432856e-02
## country_nameItaly -1.812006e-01
## country_nameJapan -1.960093e-01
## country_nameKazakhstan -4.076928e-02
## country_nameKorea, Republic of -1.263133e-01
## country_nameKyrgyzstan -3.622249e-02
## country_nameLatvia -3.280209e-02
## country_nameLithuania -3.140888e-02
## country_nameLuxembourg -6.427809e-02
## country_nameMacedonia, the former Yugoslav Republic of -3.109686e-02
## country_nameMexico -2.533428e-01
## country_nameMoldova, Republic of -2.469535e-02
## country_nameMontenegro -4.065255e-02
## country_nameMorocco -1.046107e-01
## country_nameMozambique -8.685626e-02
## country_nameNetherlands -2.356404e-02
## country_nameNorway -5.436132e-02
## country_namePhilippines -1.500721e-01
## country_namePoland -7.507745e-02
## country_namePortugal -5.736316e-02
## country_nameRomania -7.242771e-02
## country_nameRussian Federation 5.499743e-03
## country_nameSenegal -6.078346e-02
## country_nameSerbia -4.079289e-02
## country_nameSlovakia -4.491002e-02
## country_nameSlovenia -4.922933e-02
## country_nameSpain -9.286167e-02
## country_nameSweden -6.261186e-02
## country_nameSwitzerland -7.377704e-02
## country_nameTajikistan -2.905159e-02
## country_nameThailand -1.910037e-02
## country_nameTunisia -6.248389e-02
## country_nameTurkey -2.131850e-01
## country_nameTurkmenistan -2.232895e-02
## country_nameUkraine -5.564934e-02
## country_nameUnited Kingdom -8.873812e-02
## country_nameUnited States of America -1.880528e-01
## country_nameUruguay -6.630406e-02
## country_nameUzbekistan -6.534745e-02
## country_nameVenezuela -9.034680e-02
## country_nameViet Nam -1.074163e-01
## country_nameZambia -3.740036e-02
## 97.5 %
## (Intercept) 8.699893e-01
## PKcal 2.662816e+00
## calperg_food_w_calorie 1.431840e-05
## log(GDP_pcap_thous2015USD_FAO) 1.514250e-02
## year 9.438572e-05
## country_nameArmenia 4.076121e-02
## country_nameAustralia 9.100778e-02
## country_nameAustria 3.031129e-02
## country_nameAzerbaijan 3.236130e-02
## country_nameBelarus 3.505166e-02
## country_nameBelgium 5.035405e-02
## country_nameBenin 4.219803e-02
## country_nameBosnia and Herzegovina 5.111050e-02
## country_nameBotswana 4.556072e-02
## country_nameBrazil 1.314705e-01
## country_nameBulgaria 3.863769e-02
## country_nameCameroon 8.800629e-03
## country_nameCanada -2.271108e-02
## country_nameChile 2.182237e-02
## country_nameChina -2.291398e+00
## country_nameColombia -2.874808e-03
## country_nameCongo 1.169164e-01
## country_nameCosta Rica 5.036047e-02
## country_nameCote dIvoire 2.443469e-02
## country_nameCroatia 3.807910e-02
## country_nameCyprus 3.551485e-02
## country_nameCzech Republic 4.097726e-02
## country_nameDenmark 4.995796e-02
## country_nameDominican Republic 4.509243e-02
## country_nameEstonia 3.692395e-02
## country_nameFinland 4.412068e-02
## country_nameFrance -3.384396e-02
## country_nameGeorgia 4.161591e-02
## country_nameGermany 1.817121e-03
## country_nameGreece 1.186279e-02
## country_nameHungary 3.632888e-02
## country_nameIceland 3.879507e-02
## country_nameIreland 4.224994e-02
## country_nameItaly -9.319311e-02
## country_nameJapan -1.049189e-01
## country_nameKazakhstan 3.327400e-02
## country_nameKorea, Republic of -4.693974e-02
## country_nameKyrgyzstan 4.054023e-02
## country_nameLatvia 3.555758e-02
## country_nameLithuania 3.596343e-02
## country_nameLuxembourg 3.788124e-02
## country_nameMacedonia, the former Yugoslav Republic of 4.014702e-02
## country_nameMexico -1.640844e-01
## country_nameMoldova, Republic of 4.296267e-02
## country_nameMontenegro 4.724616e-02
## country_nameMorocco -1.963782e-02
## country_nameMozambique 3.836163e-02
## country_nameNetherlands 5.957605e-02
## country_nameNorway 3.770838e-02
## country_namePhilippines -6.640890e-02
## country_namePoland -1.709648e-03
## country_namePortugal 2.195278e-02
## country_nameRomania -1.340766e-04
## country_nameRussian Federation 9.018985e-02
## country_nameSenegal 6.009784e-02
## country_nameSerbia 5.000795e-02
## country_nameSlovakia 4.195438e-02
## country_nameSlovenia 4.149143e-02
## country_nameSpain -1.617126e-02
## country_nameSweden 3.691982e-02
## country_nameSwitzerland 2.165676e-02
## country_nameTajikistan 4.291171e-02
## country_nameThailand 6.095288e-02
## country_nameTunisia 2.439171e-02
## country_nameTurkey -1.315822e-01
## country_nameTurkmenistan 6.021735e-02
## country_nameUkraine 1.711756e-02
## country_nameUnited Kingdom 1.598895e-02
## country_nameUnited States of America -3.873679e-02
## country_nameUruguay 7.442068e-02
## country_nameUzbekistan 1.534000e-02
## country_nameVenezuela 4.903259e-04
## country_nameViet Nam 1.143499e-01
## country_nameZambia 6.056202e-02
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.70533 -0.01928 -0.00472 0.00742 0.46743
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.554e+00 2.740e-01 5.673 1.62e-08 ***
## staples -5.520e-01 3.149e-02 -17.533 < 2e-16 ***
## nonstaples_animal 1.350e-01 2.080e-01 0.649 0.5164
## nonstaples_other 6.277e+00 1.788e-01 35.097 < 2e-16 ***
## calperg_food_w_calorie -1.596e-05 7.215e-06 -2.212 0.0271 *
## log(GDP_pcap_thous2015USD_FAO) -1.914e-03 1.556e-03 -1.230 0.2188
## year -7.595e-04 1.362e-04 -5.576 2.82e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0707 on 1878 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.894, Adjusted R-squared: 0.8937
## F-statistic: 2640 on 6 and 1878 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 1.017054e+00 2.091808e+00
## staples -6.137730e-01 -4.902740e-01
## nonstaples_animal -2.729577e-01 5.429915e-01
## nonstaples_other 5.925902e+00 6.627383e+00
## calperg_food_w_calorie -3.010932e-05 -1.808746e-06
## log(GDP_pcap_thous2015USD_FAO) -4.964571e-03 1.137528e-03
## year -1.026627e-03 -4.923359e-04
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.70441 -0.01899 -0.00442 0.00747 0.46851
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.564e+00 2.763e-01 5.659 1.76e-08 ***
## staples -5.448e-01 3.064e-02 -17.783 < 2e-16 ***
## nonstaples_animal 9.923e-02 2.050e-01 0.484 0.6284
## nonstaples_other 6.291e+00 1.784e-01 35.272 < 2e-16 ***
## calperg_food_w_calorie -1.498e-05 7.150e-06 -2.096 0.0362 *
## GDP_pcap_thous2015USD_FAO -6.882e-05 9.148e-05 -0.752 0.4520
## year -7.666e-04 1.372e-04 -5.587 2.65e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07072 on 1878 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.894, Adjusted R-squared: 0.8936
## F-statistic: 2639 on 6 and 1878 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 1.021887e+00 2.105815e+00
## staples -6.049287e-01 -4.847502e-01
## nonstaples_animal -3.028158e-01 5.012807e-01
## nonstaples_other 5.941295e+00 6.640906e+00
## calperg_food_w_calorie -2.900583e-05 -9.619171e-07
## GDP_pcap_thous2015USD_FAO -2.482258e-04 1.105888e-04
## year -1.035703e-03 -4.974858e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.70052 -0.01769 -0.00610 0.00552 0.46876
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -5.585e-01 3.172e-02 -17.605 <2e-16 ***
## nonstaples_animal 3.860e-01 2.049e-01 1.884 0.0598 .
## nonstaples_other 6.048e+00 1.757e-01 34.427 <2e-16 ***
## calperg_food_w_calorie -6.431e-06 7.075e-06 -0.909 0.3634
## log(GDP_pcap_thous2015USD_FAO) -3.220e-03 1.551e-03 -2.076 0.0380 *
## year 1.229e-05 6.920e-06 1.776 0.0759 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07129 on 1879 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.9094, Adjusted R-squared: 0.9091
## F-statistic: 3143 on 6 and 1879 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -6.207405e-01 -4.963034e-01
## nonstaples_animal -1.589591e-02 7.879695e-01
## nonstaples_other 5.703524e+00 6.392619e+00
## calperg_food_w_calorie -2.030658e-05 7.444044e-06
## log(GDP_pcap_thous2015USD_FAO) -6.262786e-03 -1.780950e-04
## year -1.282687e-06 2.586075e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73567 -0.03961 -0.01807 0.00106 0.74694
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.018e+00 1.523e-02 66.847 < 2e-16 ***
## calperg_food_w_calorie -1.673e-06 1.169e-05 -0.143 0.886
## log(GDP_pcap_thous2015USD_FAO) 1.776e-02 2.408e-03 7.376 2.43e-13 ***
## year -2.432e-06 1.143e-05 -0.213 0.832
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1179 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.752, Adjusted R-squared: 0.7515
## F-statistic: 1426 on 4 and 1881 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.878881e-01 1.047608e+00
## calperg_food_w_calorie -2.460190e-05 2.125505e-05
## log(GDP_pcap_thous2015USD_FAO) 1.304034e-02 2.248624e-02
## year -2.485267e-05 1.998918e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73586 -0.03906 -0.02112 0.00637 0.74721
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.030e+00 1.540e-02 66.869 < 2e-16 ***
## staples_frac -1.412e-01 3.194e-02 -4.420 1.04e-05 ***
## calperg_food_w_calorie 1.210e-05 1.204e-05 1.005 0.315
## log(GDP_pcap_thous2015USD_FAO) 4.579e-03 3.826e-03 1.197 0.232
## year 2.996e-05 1.353e-05 2.214 0.027 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1173 on 1880 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7545, Adjusted R-squared: 0.7539
## F-statistic: 1156 on 5 and 1880 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.998389e-01 1.060261e+00
## staples_frac -2.038135e-01 -7.853728e-02
## calperg_food_w_calorie -1.151813e-05 3.572360e-05
## log(GDP_pcap_thous2015USD_FAO) -2.925496e-03 1.208256e-02
## year 3.418007e-06 5.649534e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73591 -0.03881 -0.02097 0.00600 0.74780
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.030e+00 1.541e-02 66.847 < 2e-16 ***
## nonstaples_frac 1.408e-01 3.173e-02 4.436 9.69e-06 ***
## calperg_food_w_calorie 1.123e-05 1.199e-05 0.937 0.34911
## log(GDP_pcap_thous2015USD_FAO) 4.707e-03 3.795e-03 1.240 0.21506
## year -4.002e-05 1.418e-05 -2.821 0.00483 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1173 on 1880 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7546, Adjusted R-squared: 0.7539
## F-statistic: 1156 on 5 and 1880 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.000104e+00 1.060562e+00
## nonstaples_frac 7.853333e-02 2.030053e-01
## calperg_food_w_calorie -1.228724e-05 3.474867e-05
## log(GDP_pcap_thous2015USD_FAO) -2.736628e-03 1.215058e-02
## year -6.784198e-05 -1.220202e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.71372 -0.02020 -0.00815 0.00675 0.52998
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 3.446e+00 4.800e-02 71.792 < 2e-16 ***
## staples_frac -7.462e-03 2.075e-02 -0.360 0.71916
## calperg_food_w_calorie -1.753e-06 7.767e-06 -0.226 0.82148
## log(GDP_pcap_thous2015USD_FAO) -8.112e-03 2.478e-03 -3.273 0.00108 **
## year 1.514e-05 8.726e-06 1.735 0.08288 .
## PKcal:staples_frac -4.076e+00 7.923e-02 -51.446 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0756 on 1879 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.8981, Adjusted R-squared: 0.8978
## F-statistic: 2760 on 6 and 1879 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 3.352101e+00 3.540391e+00
## staples_frac -4.815359e-02 3.323026e-02
## calperg_food_w_calorie -1.698612e-05 1.348034e-05
## log(GDP_pcap_thous2015USD_FAO) -1.297265e-02 -3.251418e-03
## year -1.972906e-06 3.225503e-05
## PKcal:staples_frac -4.231720e+00 -3.920926e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.085660 -0.007330 0.001102 0.005967 0.098539
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef -1.409e+00 4.361e+00 -0.323 0.746856
## Corn -7.851e+00 6.784e-01 -11.572 < 2e-16 ***
## Dairy 1.403e+01 2.091e+00 6.707 8.18e-11 ***
## FiberCrop 7.208e+01 1.139e+01 6.331 7.63e-10 ***
## Fruits -6.142e+00 3.021e+00 -2.033 0.042805 *
## Legumes 3.879e+01 4.911e+00 7.898 3.88e-14 ***
## MiscCrop -1.115e+01 9.940e+00 -1.121 0.262924
## NutsSeeds -3.056e+00 3.982e+00 -0.767 0.443392
## OilCrop -5.340e+00 1.169e+00 -4.570 6.82e-06 ***
## OilPalm -1.201e+01 3.141e+00 -3.823 0.000156 ***
## OtherGrain -4.341e+00 1.958e+00 -2.217 0.027288 *
## OtherMeat_Fish -3.263e+00 3.800e+00 -0.859 0.391086
## Poultry 1.226e+01 2.941e+00 4.170 3.86e-05 ***
## Rice 6.959e+00 5.568e-01 12.499 < 2e-16 ***
## RootTuber -2.803e+00 1.286e+00 -2.180 0.029945 *
## SheepGoat 4.932e+01 1.371e+01 3.597 0.000369 ***
## Soybean -5.702e+00 1.628e+00 -3.503 0.000522 ***
## SugarCrop 9.926e+00 1.553e+00 6.391 5.38e-10 ***
## Vegetables -1.427e+01 3.785e+00 -3.769 0.000193 ***
## Wheat -8.434e-01 4.577e-01 -1.843 0.066240 .
## NEC 5.280e+00 1.330e+00 3.970 8.74e-05 ***
## Pork -1.205e+00 1.473e+00 -0.818 0.413923
## calperg_food_w_calorie -6.708e-06 6.166e-06 -1.088 0.277376
## log(GDP_pcap_thous2015USD_FAO) 2.207e-03 1.186e-03 1.861 0.063645 .
## year 1.830e-06 5.262e-06 0.348 0.728253
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01922 on 343 degrees of freedom
## (1624 observations deleted due to missingness)
## Multiple R-squared: 0.9964, Adjusted R-squared: 0.9961
## F-statistic: 3750 on 25 and 343 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -9.987153e+00 7.169340e+00
## Corn -9.185515e+00 -6.516635e+00
## Dairy 9.914073e+00 1.814095e+01
## FiberCrop 4.968560e+01 9.447231e+01
## Fruits -1.208424e+01 -2.002010e-01
## Legumes 2.912823e+01 4.844844e+01
## MiscCrop -3.069581e+01 8.404433e+00
## NutsSeeds -1.088755e+01 4.776430e+00
## OilCrop -7.638943e+00 -3.041810e+00
## OilPalm -1.818817e+01 -5.831438e+00
## OtherGrain -8.192130e+00 -4.894364e-01
## OtherMeat_Fish -1.073727e+01 4.210977e+00
## Poultry 6.480079e+00 1.804976e+01
## Rice 5.864230e+00 8.054651e+00
## RootTuber -5.331397e+00 -2.738313e-01
## SheepGoat 2.235425e+01 7.628594e+01
## Soybean -8.903331e+00 -2.499931e+00
## SugarCrop 6.870886e+00 1.298049e+01
## Vegetables -2.171195e+01 -6.822416e+00
## Wheat -1.743631e+00 5.686078e-02
## NEC 2.664384e+00 7.895786e+00
## Pork -4.101563e+00 1.692081e+00
## calperg_food_w_calorie -1.883643e-05 5.419590e-06
## log(GDP_pcap_thous2015USD_FAO) -1.260017e-04 4.540268e-03
## year -8.520845e-06 1.218073e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74012 -0.04266 -0.02251 -0.00218 0.77843
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.586e-06 2.420e-08 65.530 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.653e-02 2.385e-03 6.928 5.83e-12 ***
## year 4.779e-07 3.080e-06 0.155 0.877
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1196 on 1882 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7445, Adjusted R-squared: 0.7441
## F-statistic: 1828 on 3 and 1882 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.538533e-06 1.633467e-06
## log(GDP_pcap_thous2015USD_FAO) 1.184721e-02 2.120302e-02
## year -5.562436e-06 6.518291e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.78232 -0.01634 -0.00620 0.00233 0.65199
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -1.068e-08 3.669e-08 -0.291 0.771
## Feed_Kt 5.309e-06 1.095e-07 48.457 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.641e-03 1.617e-03 1.634 0.102
## year -3.407e-07 2.055e-06 -0.166 0.868
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0798 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.8863, Adjusted R-squared: 0.8861
## F-statistic: 3667 on 4 and 1881 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -8.264162e-08 6.128609e-08
## Feed_Kt 5.093652e-06 5.523359e-06
## log(GDP_pcap_thous2015USD_FAO) -5.295283e-04 5.812050e-03
## year -4.370306e-06 3.688935e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.80043 -0.01569 -0.00566 0.00260 0.65167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -5.305e-02 2.488e-02 -2.132 0.0332 *
## Feed_Kt 5.506e-06 1.165e-07 47.258 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.992e-03 1.625e-03 1.226 0.2204
## year 1.587e-07 2.062e-06 0.077 0.9387
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0797 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.8866, Adjusted R-squared: 0.8864
## F-statistic: 3677 on 4 and 1881 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -1.018496e-01 -4.241070e-03
## Feed_Kt 5.277537e-06 5.734540e-06
## log(GDP_pcap_thous2015USD_FAO) -1.195116e-03 5.178668e-03
## year -3.886097e-06 4.203590e-06
## png
## 2
plot_ly(comb_data_sel_4) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_4) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
Mean-centered.
# mean-center GDP per capita, food production, and calories per g
comb_data_sel_4_cent <- comb_data_sel_4 %>%
ungroup() %>%
mutate(PKcal = PKcal - mean(PKcal),
calperg_food_w_calorie = calperg_food_w_calorie - mean(calperg_food_w_calorie),
GDP_pcap_thous2015USD_FAO = GDP_pcap_thous2015USD_FAO - mean(GDP_pcap_thous2015USD_FAO, na.rm = TRUE),
GDP_pcap_thous2015USD_calc = GDP_pcap_thous2015USD_calc - mean(GDP_pcap_thous2015USD_calc, na.rm = TRUE))
calc_lin_model_food_en_use_production(comb_data_sel_4_cent, "4cent")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74955 -0.03152 -0.02519 -0.00834 0.78068
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.090338 0.002611 34.60 <2e-16 ***
## PKcal 1.013260 0.014979 67.65 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1165 on 1990 degrees of freedom
## Multiple R-squared: 0.6969, Adjusted R-squared: 0.6968
## F-statistic: 4576 on 1 and 1990 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65922 0.05882 0.06515 0.08200 0.87102
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.01326 0.01895 53.47 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1474 on 1991 degrees of freedom
## Multiple R-squared: 0.5895, Adjusted R-squared: 0.5893
## F-statistic: 2859 on 1 and 1991 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75260 -0.03239 -0.02471 -0.00699 0.77883
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.034e-02 2.610e-03 34.612 <2e-16 ***
## PKcal 1.013e+00 1.498e-02 67.614 <2e-16 ***
## calperg_food_w_calorie -1.832e-05 1.087e-05 -1.685 0.0922 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1165 on 1989 degrees of freedom
## Multiple R-squared: 0.6974, Adjusted R-squared: 0.6971
## F-statistic: 2292 on 2 and 1989 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74429 -0.03317 -0.02158 -0.00410 0.75075
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.188e-02 2.735e-03 33.592 < 2e-16 ***
## PKcal 1.014e+00 1.532e-02 66.213 < 2e-16 ***
## calperg_food_w_calorie -1.217e-05 1.174e-05 -1.037 0.3
## GDP_pcap_thous2015USD_FAO 7.471e-04 1.457e-04 5.128 3.24e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1187 on 1881 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.7006, Adjusted R-squared: 0.7001
## F-statistic: 1467 on 3 and 1881 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65511 -0.02232 0.00002 0.02979 0.31773
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.863e-02 5.779e-03 13.605 < 2e-16 ***
## PKcal 2.177e+00 2.625e-02 82.943 < 2e-16 ***
## calperg_food_w_calorie -1.170e-04 1.589e-05 -7.362 5.37e-13 ***
## log(GDP_pcap_thous2015USD_FAO) 1.290e-02 2.023e-03 6.376 3.39e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05983 on 667 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9127, Adjusted R-squared: 0.9123
## F-statistic: 2324 on 3 and 667 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74559 -0.03271 -0.02180 -0.00462 0.75946
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.119e-02 2.666e-03 34.207 < 2e-16 ***
## PKcal 1.016e+00 1.513e-02 67.170 < 2e-16 ***
## calperg_food_w_calorie -6.939e-06 1.134e-05 -0.612 0.541
## GDP_pcap_thous2015USD_calc 5.821e-04 1.232e-04 4.725 2.47e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1173 on 1934 degrees of freedom
## (54 observations deleted due to missingness)
## Multiple R-squared: 0.7004, Adjusted R-squared: 0.7
## F-statistic: 1507 on 3 and 1934 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64378 -0.02114 0.00322 0.02351 0.33801
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.087551 0.005871 14.911 < 2e-16 ***
## PKcal 2.150037 0.027002 79.624 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.011158 0.002088 5.345 1.24e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06217 on 668 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9056, Adjusted R-squared: 0.9053
## F-statistic: 3203 on 2 and 668 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.63278 -0.03211 0.00032 0.02899 0.25617
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.1166423 0.0023370 49.911 < 2e-16 ***
## PKcal 0.9079093 0.1145482 7.926 9.52e-15 ***
## PKcal:calperg_food_w_calorie -0.0016154 0.0003275 -4.933 1.03e-06 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.3690991 0.0342873 10.765 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05778 on 667 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9186, Adjusted R-squared: 0.9182
## F-statistic: 2507 on 3 and 667 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65821 -0.01542 -0.00314 0.01635 0.16075
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.446e-02 5.375e-03 10.131 < 2e-16 ***
## PKcal 5.844e-01 1.130e-01 5.173 3.05e-07 ***
## calperg_food_w_calorie -1.521e-04 1.657e-05 -9.180 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.271e-02 1.877e-03 12.097 < 2e-16 ***
## PKcal:calperg_food_w_calorie -2.935e-03 3.489e-04 -8.412 2.47e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.644e-01 3.435e-02 13.520 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04917 on 665 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9412, Adjusted R-squared: 0.9408
## F-statistic: 2129 on 5 and 665 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 0.0439016507 0.0650115257
## PKcal 0.3625479894 0.8061661767
## calperg_food_w_calorie -0.0001846099 -0.0001195501
## log(GDP_pcap_thous2015USD_FAO) 0.0190213286 0.0263930174
## PKcal:calperg_food_w_calorie -0.0036195980 -0.0022495381
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.3969396316 0.5318215066
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65592 -0.02244 -0.00009 0.02968 0.31822
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.753e-01 4.128e-01 0.667 0.505
## PKcal 2.178e+00 2.631e-02 82.796 < 2e-16 ***
## calperg_food_w_calorie -1.193e-04 1.662e-05 -7.178 1.89e-12 ***
## log(GDP_pcap_thous2015USD_FAO) 1.319e-02 2.115e-03 6.238 7.90e-10 ***
## year -9.887e-05 2.075e-04 -0.476 0.634
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05987 on 666 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9127, Adjusted R-squared: 0.9122
## F-statistic: 1741 on 4 and 666 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -0.5352792035 1.085892e+00
## PKcal 2.1264266320 2.229735e+00
## calperg_food_w_calorie -0.0001519378 -8.666829e-05
## log(GDP_pcap_thous2015USD_FAO) 0.0090381066 1.734250e-02
## year -0.0005062970 3.085600e-04
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.71338 -0.00683 0.00074 0.00764 0.25766
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.131e+00 5.137e-01 -2.201 0.028116 *
## PKcal 2.134e+00 2.545e-01 8.385 3.23e-16 ***
## calperg_food_w_calorie -7.493e-05 3.387e-05 -2.212 0.027295 *
## log(GDP_pcap_thous2015USD_FAO) -4.452e-03 4.226e-03 -1.054 0.292489
## year 6.658e-04 2.618e-04 2.543 0.011224 *
## country_nameAustria -5.101e-02 1.546e-02 -3.299 0.001026 **
## country_nameBelgium -4.805e-02 1.630e-02 -2.947 0.003326 **
## country_nameCanada -1.023e-01 1.441e-02 -7.101 3.31e-12 ***
## country_nameCyprus -8.406e-02 1.562e-02 -5.381 1.04e-07 ***
## country_nameCzech Republic -9.691e-02 5.215e-02 -1.858 0.063597 .
## country_nameDenmark -4.624e-02 1.202e-02 -3.847 0.000132 ***
## country_nameEstonia -1.159e-01 4.537e-02 -2.554 0.010889 *
## country_nameFinland -8.546e-02 1.877e-02 -4.552 6.35e-06 ***
## country_nameFrance -8.679e-02 2.149e-02 -4.039 6.02e-05 ***
## country_nameGermany -6.338e-02 2.490e-02 -2.545 0.011164 *
## country_nameGreece -1.062e-01 1.841e-02 -5.768 1.25e-08 ***
## country_nameIceland -6.841e-02 1.250e-02 -5.474 6.32e-08 ***
## country_nameIreland -6.524e-02 1.238e-02 -5.270 1.87e-07 ***
## country_nameItaly -1.551e-01 2.150e-02 -7.214 1.54e-12 ***
## country_nameJapan -1.510e-01 3.084e-02 -4.895 1.25e-06 ***
## country_nameKorea, Republic of -1.374e-01 1.968e-02 -6.980 7.42e-12 ***
## country_nameLuxembourg -8.128e-02 1.683e-02 -4.830 1.71e-06 ***
## country_nameNetherlands -3.758e-02 1.071e-02 -3.507 0.000485 ***
## country_nameNorway -6.394e-02 1.241e-02 -5.154 3.41e-07 ***
## country_namePortugal -1.096e-01 1.971e-02 -5.561 3.94e-08 ***
## country_nameSlovenia -9.013e-02 1.927e-02 -4.677 3.55e-06 ***
## country_nameSpain -1.131e-01 1.760e-02 -6.427 2.54e-10 ***
## country_nameSweden -6.605e-02 1.724e-02 -3.831 0.000140 ***
## country_nameSwitzerland -6.604e-02 1.230e-02 -5.369 1.11e-07 ***
## country_nameUnited Kingdom -6.750e-02 2.228e-02 -3.030 0.002546 **
## country_nameUnited States of America 1.301e-02 1.129e-01 0.115 0.908290
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04732 on 640 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9476, Adjusted R-squared: 0.9451
## F-statistic: 385.6 on 30 and 640 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -2.1392624294 -1.217410e-01
## PKcal 1.6345750035 2.634265e+00
## calperg_food_w_calorie -0.0001414403 -8.422253e-06
## log(GDP_pcap_thous2015USD_FAO) -0.0127513042 3.846374e-03
## year 0.0001516858 1.179941e-03
## country_nameAustria -0.0813761854 -2.064297e-02
## country_nameBelgium -0.0800626848 -1.603118e-02
## country_nameCanada -0.1306084358 -7.402110e-02
## country_nameCyprus -0.1147278922 -5.338348e-02
## country_nameCzech Republic -0.1993286609 5.500175e-03
## country_nameDenmark -0.0698390200 -2.263564e-02
## country_nameEstonia -0.2049724233 -2.677194e-02
## country_nameFinland -0.1223181997 -4.859349e-02
## country_nameFrance -0.1289780668 -4.459391e-02
## country_nameGermany -0.1122758942 -1.447428e-02
## country_nameGreece -0.1423163531 -7.002907e-02
## country_nameIceland -0.0929481437 -4.386915e-02
## country_nameIreland -0.0895550481 -4.093437e-02
## country_nameItaly -0.1973415784 -1.128935e-01
## country_nameJapan -0.2115269505 -9.040037e-02
## country_nameKorea, Republic of -0.1760446166 -9.873652e-02
## country_nameLuxembourg -0.1143285125 -4.823896e-02
## country_nameNetherlands -0.0586139920 -1.653672e-02
## country_nameNorway -0.0882972095 -3.957519e-02
## country_namePortugal -0.1482882812 -7.089396e-02
## country_nameSlovenia -0.1279710157 -5.229217e-02
## country_nameSpain -0.1476397745 -7.853505e-02
## country_nameSweden -0.0998975280 -3.219733e-02
## country_nameSwitzerland -0.0901919138 -4.188832e-02
## country_nameUnited Kingdom -0.1112495776 -2.375143e-02
## country_nameUnited States of America -0.2086751942 2.346951e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.67552 -0.01361 -0.00176 0.01485 0.18004
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.231e+00 3.483e-01 3.535 0.000436 ***
## staples -1.143e+00 1.882e-01 -6.074 2.1e-09 ***
## nonstaples_animal 5.051e-01 2.146e-01 2.354 0.018882 *
## nonstaples_other 6.159e+00 2.370e-01 25.993 < 2e-16 ***
## calperg_food_w_calorie -3.279e-05 1.426e-05 -2.299 0.021831 *
## log(GDP_pcap_thous2015USD_FAO) 4.150e-03 1.770e-03 2.344 0.019367 *
## year -6.188e-04 1.748e-04 -3.540 0.000428 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04822 on 664 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9435, Adjusted R-squared: 0.943
## F-statistic: 1850 on 6 and 664 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 5.473881e-01 1.915080e+00
## staples -1.512447e+00 -7.734942e-01
## nonstaples_animal 8.370955e-02 9.264620e-01
## nonstaples_other 5.694005e+00 6.624574e+00
## calperg_food_w_calorie -6.079894e-05 -4.781051e-06
## log(GDP_pcap_thous2015USD_FAO) 6.737057e-04 7.625739e-03
## year -9.619785e-04 -2.755410e-04
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.70441 -0.01899 -0.00442 0.00747 0.46851
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.536e+00 2.739e-01 5.609 2.34e-08 ***
## staples -5.448e-01 3.064e-02 -17.783 < 2e-16 ***
## nonstaples_animal 9.923e-02 2.050e-01 0.484 0.6284
## nonstaples_other 6.291e+00 1.784e-01 35.272 < 2e-16 ***
## calperg_food_w_calorie -1.498e-05 7.150e-06 -2.096 0.0362 *
## GDP_pcap_thous2015USD_FAO -6.882e-05 9.148e-05 -0.752 0.4520
## year -7.666e-04 1.372e-04 -5.587 2.65e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07072 on 1878 degrees of freedom
## (107 observations deleted due to missingness)
## Multiple R-squared: 0.894, Adjusted R-squared: 0.8936
## F-statistic: 2639 on 6 and 1878 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 9.989009e-01 2.073141e+00
## staples -6.049287e-01 -4.847502e-01
## nonstaples_animal -3.028158e-01 5.012807e-01
## nonstaples_other 5.941295e+00 6.640906e+00
## calperg_food_w_calorie -2.900583e-05 -9.619171e-07
## GDP_pcap_thous2015USD_FAO -2.482258e-04 1.105888e-04
## year -1.035703e-03 -4.974858e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.67235 -0.01400 -0.00444 0.01578 0.18692
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -1.106e+00 1.895e-01 -5.834 8.44e-09 ***
## nonstaples_animal 7.239e-01 2.072e-01 3.493 0.000509 ***
## nonstaples_other 5.938e+00 2.305e-01 25.759 < 2e-16 ***
## calperg_food_w_calorie -2.412e-05 1.417e-05 -1.702 0.089245 .
## log(GDP_pcap_thous2015USD_FAO) 2.751e-03 1.740e-03 1.581 0.114371
## year -8.858e-07 2.764e-06 -0.320 0.748735
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04863 on 665 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9546, Adjusted R-squared: 0.9542
## F-statistic: 2333 on 6 and 665 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -1.477575e+00 -7.334456e-01
## nonstaples_animal 3.169627e-01 1.130845e+00
## nonstaples_other 5.485544e+00 6.390843e+00
## calperg_food_w_calorie -5.195040e-05 3.708450e-06
## log(GDP_pcap_thous2015USD_FAO) -6.658971e-04 6.168700e-03
## year -6.313525e-06 4.541956e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65479 -0.02232 -0.00002 0.02994 0.31752
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.177e+00 2.626e-02 82.920 < 2e-16 ***
## calperg_food_w_calorie -1.161e-04 1.591e-05 -7.298 8.33e-13 ***
## log(GDP_pcap_thous2015USD_FAO) 1.280e-02 2.031e-03 6.302 5.33e-10 ***
## year 3.950e-05 2.905e-06 13.594 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05984 on 667 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9311, Adjusted R-squared: 0.9307
## F-statistic: 2254 on 4 and 667 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.125558e+00 2.228665e+00
## calperg_food_w_calorie -1.473519e-04 -8.487204e-05
## log(GDP_pcap_thous2015USD_FAO) 8.811562e-03 1.678706e-02
## year 3.379179e-05 4.520134e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68037 -0.02380 -0.00036 0.02176 0.29873
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.233e+00 2.464e-02 90.628 <2e-16 ***
## staples_frac -3.302e-01 2.962e-02 -11.149 <2e-16 ***
## calperg_food_w_calorie -1.330e-04 1.470e-05 -9.053 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 4.602e-03 2.005e-03 2.295 0.0221 *
## year 1.002e-04 6.068e-06 16.521 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05498 on 666 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9419, Adjusted R-squared: 0.9415
## F-statistic: 2161 on 5 and 666 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.185027e+00 2.2818042730
## staples_frac -3.883621e-01 -0.2720491494
## calperg_food_w_calorie -1.618836e-04 -0.0001041753
## log(GDP_pcap_thous2015USD_FAO) 6.637986e-04 0.0085393074
## year 8.833461e-05 0.0001121635
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68033 -0.02407 -0.00016 0.02281 0.30050
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.232e+00 2.474e-02 90.190 < 2e-16 ***
## nonstaples_frac 3.130e-01 2.889e-02 10.834 < 2e-16 ***
## calperg_food_w_calorie -1.358e-04 1.479e-05 -9.179 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 5.473e-03 1.992e-03 2.747 0.00617 **
## year -6.023e-05 9.587e-06 -6.282 6.02e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05522 on 666 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9414, Adjusted R-squared: 0.941
## F-statistic: 2141 on 5 and 666 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.183001e+00 2.280169e+00
## nonstaples_frac 2.562828e-01 3.697365e-01
## calperg_food_w_calorie -1.648221e-04 -1.067309e-04
## log(GDP_pcap_thous2015USD_FAO) 1.561145e-03 9.384856e-03
## year -7.905306e-05 -4.140454e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68721 -0.02067 -0.00064 0.02027 0.30395
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.916e+00 1.367e-01 21.327 < 2e-16 ***
## staples_frac -2.627e-01 3.198e-02 -8.214 1.11e-15 ***
## calperg_food_w_calorie -1.054e-04 1.543e-05 -6.829 1.93e-11 ***
## log(GDP_pcap_thous2015USD_FAO) 6.046e-03 1.990e-03 3.039 0.00247 **
## year 8.990e-05 6.299e-06 14.272 < 2e-16 ***
## PKcal:staples_frac -2.405e+00 4.743e-01 -5.070 5.15e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05398 on 665 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9441, Adjusted R-squared: 0.9436
## F-statistic: 1872 on 6 and 665 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.6472153515 3.184100e+00
## staples_frac -0.3255273862 -1.999233e-01
## calperg_food_w_calorie -0.0001356460 -7.506035e-05
## log(GDP_pcap_thous2015USD_FAO) 0.0021394712 9.953405e-03
## year 0.0000775281 1.022629e-04
## PKcal:staples_frac -3.3359070217 -1.473447e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.0279890 -0.0049571 0.0002886 0.0061796 0.0257782
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 1.274e+01 8.051e+00 1.583 0.116352
## Corn 6.369e+00 8.353e+00 0.763 0.447368
## Dairy 4.243e+01 3.195e+00 13.278 < 2e-16 ***
## FiberCrop 1.160e+02 2.131e+01 5.442 3.23e-07 ***
## Fruits -2.393e+01 9.343e+00 -2.561 0.011797 *
## Legumes 1.841e+01 9.905e+00 1.858 0.065776 .
## MiscCrop -5.878e+00 1.217e+01 -0.483 0.630015
## NutsSeeds -2.248e+01 1.332e+01 -1.688 0.094232 .
## OilCrop 6.163e-01 2.197e+00 0.281 0.779589
## OilPalm 9.977e+00 8.987e+00 1.110 0.269334
## OtherGrain -3.913e+00 5.426e+00 -0.721 0.472348
## OtherMeat_Fish 3.195e+01 8.338e+00 3.831 0.000213 ***
## Poultry 2.592e+01 6.330e+00 4.094 8.12e-05 ***
## Rice 1.751e+00 1.373e+00 1.276 0.204814
## RootTuber -1.276e+00 7.170e+00 -0.178 0.859114
## SheepGoat -8.043e+01 2.083e+01 -3.861 0.000191 ***
## Soybean -3.268e+00 3.981e+00 -0.821 0.413553
## SugarCrop -5.284e+00 4.487e+00 -1.178 0.241518
## Vegetables 2.065e+00 1.119e+01 0.184 0.854013
## Wheat -8.626e+00 1.989e+00 -4.336 3.22e-05 ***
## NEC -9.083e+00 3.992e+00 -2.276 0.024801 *
## Pork -9.805e+00 4.860e+00 -2.017 0.046081 *
## calperg_food_w_calorie 2.442e-05 1.272e-05 1.920 0.057412 .
## log(GDP_pcap_thous2015USD_FAO) -3.308e-04 9.393e-04 -0.352 0.725404
## year 3.147e-06 1.722e-06 1.828 0.070243 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01068 on 110 degrees of freedom
## (1857 observations deleted due to missingness)
## Multiple R-squared: 0.9986, Adjusted R-squared: 0.9983
## F-statistic: 3207 on 25 and 110 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -3.212451e+00 2.869691e+01
## Corn -1.018401e+01 2.292285e+01
## Dairy 3.609345e+01 4.875710e+01
## FiberCrop 7.373819e+01 1.582044e+02
## Fruits -4.244093e+01 -5.410253e+00
## Legumes -1.221343e+00 3.803934e+01
## MiscCrop -2.999383e+01 1.823740e+01
## NutsSeeds -4.887566e+01 3.911566e+00
## OilCrop -3.737131e+00 4.969680e+00
## OilPalm -7.832451e+00 2.778638e+01
## OtherGrain -1.466571e+01 6.839966e+00
## OtherMeat_Fish 1.542105e+01 4.847061e+01
## Poultry 1.337074e+01 3.845991e+01
## Rice -9.693740e-01 4.470836e+00
## RootTuber -1.548408e+01 1.293287e+01
## SheepGoat -1.217024e+02 -3.914838e+01
## Soybean -1.115793e+01 4.622357e+00
## SugarCrop -1.417733e+01 3.608900e+00
## Vegetables -2.011971e+01 2.424889e+01
## Wheat -1.256843e+01 -4.683788e+00
## NEC -1.699374e+01 -1.173247e+00
## Pork -1.943741e+01 -1.735550e-01
## calperg_food_w_calorie -7.818775e-07 4.962222e-05
## log(GDP_pcap_thous2015USD_FAO) -2.192270e-03 1.530723e-03
## year -2.645527e-07 6.559550e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65792 -0.02139 0.00319 0.02127 0.28281
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 3.800e-06 4.478e-08 84.859 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.136e-02 1.976e-03 5.747 1.38e-08 ***
## year -1.950e-05 2.840e-06 -6.867 1.50e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05867 on 668 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9337, Adjusted R-squared: 0.9334
## F-statistic: 3135 on 3 and 668 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 3.712424e-06 3.888293e-06
## log(GDP_pcap_thous2015USD_FAO) 7.477472e-03 1.523809e-02
## year -2.507951e-05 -1.392608e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73183 -0.01826 0.00070 0.01445 0.30077
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 2.342e-06 1.576e-07 14.857 < 2e-16 ***
## Feed_Kt 2.178e-06 2.269e-07 9.602 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 8.685e-03 1.875e-03 4.633 4.34e-06 ***
## year -1.482e-05 2.708e-06 -5.471 6.34e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05503 on 667 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9417, Adjusted R-squared: 0.9414
## F-statistic: 2696 on 4 and 667 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 2.032246e-06 2.651216e-06
## Feed_Kt 1.732982e-06 2.623984e-06
## log(GDP_pcap_thous2015USD_FAO) 5.003865e-03 1.236517e-02
## year -2.013549e-05 -9.499242e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73936 -0.01769 -0.00068 0.01543 0.33393
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.154e+00 8.566e-02 13.473 < 2e-16 ***
## Feed_Kt 2.629e-06 2.167e-07 12.129 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 7.943e-03 1.913e-03 4.152 3.72e-05 ***
## year 2.026e-05 3.312e-06 6.117 1.62e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05629 on 667 degrees of freedom
## (1321 observations deleted due to missingness)
## Multiple R-squared: 0.9391, Adjusted R-squared: 0.9387
## F-statistic: 2569 on 4 and 667 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.859566e-01 1.322367e+00
## Feed_Kt 2.203265e-06 3.054393e-06
## log(GDP_pcap_thous2015USD_FAO) 4.186708e-03 1.169897e-02
## year 1.375568e-05 2.676114e-05
## png
## 2
# get regions and years to remove
country_years_excl_high_inonspec <- IEA_ind_sectors_region_total_en %>%
filter(FLOW == "INONSPEC") %>%
filter(frac > max_frac_INONSPEC) %>%
dplyr::select(iso, country_name, GCAM_region_ID, year) %>%
distinct()
country_years_excl_low_foodpro <- IEA_ind_sectors_region_total_en %>%
filter(FLOW == "FOODPRO") %>%
filter(frac < min_frac_FOODPRO | is.na(frac)) %>%
dplyr::select(iso, country_name, GCAM_region_ID, year) %>%
distinct()
comb_data_sel_5 <- comb_data_sel_cats %>%
filter(year >= 2010 & year <= 2015,
!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_high_inonspec) %>%
anti_join(country_years_excl_low_foodpro)
calc_lin_model_food_en_use_production(comb_data_sel_5, "5")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44862 -0.02912 -0.02231 -0.00940 0.69588
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.023527 0.005842 4.027 6.65e-05 ***
## PKcal 1.235391 0.028902 42.744 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1173 on 438 degrees of freedom
## Multiple R-squared: 0.8066, Adjusted R-squared: 0.8062
## F-statistic: 1827 on 1 and 438 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48196 -0.00679 0.00093 0.01332 0.70884
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.26917 0.02813 45.11 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1193 on 439 degrees of freedom
## Multiple R-squared: 0.8226, Adjusted R-squared: 0.8222
## F-statistic: 2035 on 1 and 439 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44758 -0.02880 -0.02056 -0.00905 0.69545
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.430e-03 3.927e-02 0.138 0.890
## PKcal 1.237e+00 2.919e-02 42.387 <2e-16 ***
## calperg_food_w_calorie 1.068e-05 2.290e-05 0.466 0.641
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1174 on 437 degrees of freedom
## Multiple R-squared: 0.8067, Adjusted R-squared: 0.8058
## F-statistic: 912 on 2 and 437 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44216 -0.03474 -0.01438 -0.00424 0.70270
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -3.153e-02 4.022e-02 -0.784 0.433518
## PKcal 1.243e+00 2.901e-02 42.855 < 2e-16 ***
## calperg_food_w_calorie 2.103e-05 2.295e-05 0.916 0.360131
## GDP_pcap_thous2015USD_FAO 9.593e-04 2.620e-04 3.661 0.000282 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1165 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8126, Adjusted R-squared: 0.8113
## F-statistic: 621.4 on 3 and 430 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43975 -0.03995 -0.01963 0.00273 0.69601
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -7.761e-02 4.303e-02 -1.803 0.072 .
## PKcal 1.241e+00 2.879e-02 43.099 < 2e-16 ***
## calperg_food_w_calorie 3.197e-05 2.313e-05 1.382 0.168
## log(GDP_pcap_thous2015USD_FAO) 1.988e-02 4.554e-03 4.365 1.6e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1157 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8149, Adjusted R-squared: 0.8136
## F-statistic: 631.2 on 3 and 430 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44081 -0.03540 -0.01561 -0.00275 0.69967
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.411e-02 4.459e-02 -0.989 0.323139
## PKcal 1.245e+00 2.950e-02 42.196 < 2e-16 ***
## calperg_food_w_calorie 2.920e-05 2.579e-05 1.132 0.258195
## GDP_pcap_thous2015USD_calc 8.086e-04 2.358e-04 3.429 0.000666 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1181 on 418 degrees of freedom
## (18 observations deleted due to missingness)
## Multiple R-squared: 0.8119, Adjusted R-squared: 0.8105
## F-statistic: 601.4 on 3 and 418 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44327 -0.03801 -0.01784 0.00104 0.69627
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.02056 0.01216 -1.691 0.0915 .
## PKcal 1.23556 0.02856 43.265 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.01864 0.00447 4.170 3.68e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1158 on 431 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8141, Adjusted R-squared: 0.8133
## F-statistic: 943.8 on 2 and 431 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.26992 -0.01222 0.00692 0.01182 0.55652
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0105433 0.0045556 -2.314 0.0211 *
## PKcal -2.5015948 0.2341459 -10.684 <2e-16 ***
## PKcal:calperg_food_w_calorie 0.0021737 0.0002032 10.699 <2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.3786090 0.0431895 8.766 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0805 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9104, Adjusted R-squared: 0.9098
## F-statistic: 1457 on 3 and 430 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.27802 -0.01699 0.00348 0.01664 0.53445
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.070e-01 3.080e-02 3.473 0.000567 ***
## PKcal -2.961e+00 2.530e-01 -11.703 < 2e-16 ***
## calperg_food_w_calorie -7.324e-05 1.723e-05 -4.251 2.61e-05 ***
## log(GDP_pcap_thous2015USD_FAO) 1.018e-03 3.439e-03 0.296 0.767431
## PKcal:calperg_food_w_calorie 2.588e-03 2.233e-04 11.591 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 3.204e-01 4.825e-02 6.640 9.51e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07897 on 428 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9142, Adjusted R-squared: 0.9132
## F-statistic: 912.2 on 5 and 428 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 0.046438677 0.1675159819
## PKcal -3.457929626 -2.4634677733
## calperg_food_w_calorie -0.000107106 -0.0000393806
## log(GDP_pcap_thous2015USD_FAO) -0.005741224 0.0077764094
## PKcal:calperg_food_w_calorie 0.002149015 0.0030267166
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.225581368 0.4152685454
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43741 -0.03937 -0.01930 0.00393 0.69549
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.860e+00 6.531e+00 0.285 0.776
## PKcal 1.241e+00 2.882e-02 43.052 < 2e-16 ***
## calperg_food_w_calorie 3.178e-05 2.317e-05 1.372 0.171
## log(GDP_pcap_thous2015USD_FAO) 1.988e-02 4.559e-03 4.361 1.62e-05 ***
## year -9.628e-04 3.244e-03 -0.297 0.767
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1158 on 429 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.815, Adjusted R-squared: 0.8132
## F-statistic: 472.4 on 4 and 429 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.097552e+01 1.469623e+01
## PKcal 1.184276e+00 1.297584e+00
## calperg_food_w_calorie -1.374928e-05 7.731371e-05
## log(GDP_pcap_thous2015USD_FAO) 1.092098e-02 2.884254e-02
## year -7.339642e-03 5.414048e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.052444 -0.002569 0.000000 0.002174 0.136315
##
## Coefficients:
## Estimate Std. Error
## (Intercept) -7.852e-02 1.011e+00
## PKcal -1.438e+00 1.357e-01
## calperg_food_w_calorie -6.685e-05 1.891e-05
## log(GDP_pcap_thous2015USD_FAO) 3.736e-02 1.674e-02
## year 5.695e-05 5.093e-04
## country_nameAlgeria 1.188e-01 1.552e-02
## country_nameArgentina 1.817e-01 3.217e-02
## country_nameArmenia 8.362e-04 1.145e-02
## country_nameAustralia 1.138e-01 4.679e-02
## country_nameAustria -1.180e-02 4.719e-02
## country_nameAzerbaijan 3.174e-02 1.312e-02
## country_nameBelarus 3.484e-02 1.246e-02
## country_nameBelgium 2.679e-02 4.547e-02
## country_nameBenin 8.672e-02 2.649e-02
## country_nameBosnia and Herzegovina 6.196e-03 9.236e-03
## country_nameBotswana 1.505e-02 1.815e-02
## country_nameBrazil 1.294e+00 3.489e-02
## country_nameBulgaria 3.720e-02 1.986e-02
## country_nameCameroon 8.810e-02 2.022e-02
## country_nameCanada 6.546e-02 4.534e-02
## country_nameChina 4.064e+00 2.162e-01
## country_nameColombia 1.461e-01 1.513e-02
## country_nameCongo 5.581e-02 1.896e-02
## country_nameCosta Rica 2.742e-02 2.672e-02
## country_nameCote dIvoire 1.058e-01 1.811e-02
## country_nameCroatia -3.805e-03 2.418e-02
## country_nameCyprus -3.742e-02 3.652e-02
## country_nameCzech Republic 1.611e-02 3.097e-02
## country_nameDenmark -3.717e-02 4.823e-02
## country_nameDominican Republic 3.519e-02 1.474e-02
## country_nameEstonia -3.536e-02 2.827e-02
## country_nameFinland -4.884e-02 4.418e-02
## country_nameFrance 2.722e-01 4.340e-02
## country_nameGeorgia 4.505e-02 1.353e-02
## country_nameGermany 2.981e-01 4.316e-02
## country_nameGreece -9.259e-04 3.100e-02
## country_nameHungary 3.511e-02 2.788e-02
## country_nameIceland -7.573e-02 4.684e-02
## country_nameIreland -4.837e-02 4.682e-02
## country_nameIsrael -3.257e-02 4.329e-02
## country_nameItaly 1.796e-01 3.979e-02
## country_nameJamaica 1.686e-02 1.518e-02
## country_nameJapan 3.710e-01 4.247e-02
## country_nameKazakhstan 1.930e-02 1.889e-02
## country_nameKorea, Republic of 1.164e-01 3.718e-02
## country_nameKyrgyzstan 6.436e-02 2.242e-02
## country_nameLatvia -1.948e-02 2.429e-02
## country_nameLithuania -1.518e-02 2.474e-02
## country_nameLuxembourg -1.104e-01 5.849e-02
## country_nameMacedonia, the former Yugoslav Republic of 1.003e-02 1.067e-02
## country_nameMalta -4.260e-02 3.436e-02
## country_nameMexico 2.704e-01 2.788e-02
## country_nameMoldova, Republic of 7.739e-02 2.138e-02
## country_nameMontenegro 1.399e-04 1.467e-02
## country_nameMorocco 1.263e-01 1.748e-02
## country_nameMyanmar 1.794e-01 2.830e-02
## country_nameNetherlands 3.764e-02 4.459e-02
## country_nameNew Zealand -5.759e-03 4.414e-02
## country_nameNorway -6.592e-02 5.320e-02
## country_namePhilippines 2.802e-01 2.247e-02
## country_namePoland 1.308e-01 2.484e-02
## country_namePortugal -5.609e-03 3.069e-02
## country_nameRomania 3.617e-02 1.606e-02
## country_nameRussian Federation 5.711e-01 2.777e-02
## country_nameSenegal 1.487e-01 2.906e-02
## country_nameSerbia 4.311e-02 1.297e-02
## country_nameSlovakia 4.204e-03 3.188e-02
## country_nameSlovenia -3.446e-02 3.302e-02
## country_nameSpain 1.131e-01 3.445e-02
## country_nameSweden -4.226e-02 4.686e-02
## country_nameSwitzerland -5.060e-02 5.645e-02
## country_nameTajikistan 9.134e-02 2.502e-02
## country_nameThailand 4.203e-01 2.138e-02
## country_nameTogo 1.335e-01 3.167e-02
## country_nameTunisia 5.117e-02 1.251e-02
## country_nameTurkey 2.123e-01 2.273e-02
## country_nameUkraine 1.743e-01 1.416e-02
## country_nameUnited Kingdom 1.545e-01 4.361e-02
## country_nameUnited States of America 1.706e+00 6.637e-02
## country_nameUruguay -4.827e-03 3.147e-02
## country_nameVenezuela 7.084e-02 2.996e-02
## country_nameViet Nam 2.945e-01 2.269e-02
## country_nameZimbabwe 1.413e-01 2.822e-02
## t value Pr(>|t|)
## (Intercept) -0.078 0.938127
## PKcal -10.597 < 2e-16 ***
## calperg_food_w_calorie -3.536 0.000461 ***
## log(GDP_pcap_thous2015USD_FAO) 2.231 0.026304 *
## year 0.112 0.911037
## country_nameAlgeria 7.653 1.91e-13 ***
## country_nameArgentina 5.648 3.37e-08 ***
## country_nameArmenia 0.073 0.941805
## country_nameAustralia 2.431 0.015549 *
## country_nameAustria -0.250 0.802609
## country_nameAzerbaijan 2.420 0.016037 *
## country_nameBelarus 2.796 0.005453 **
## country_nameBelgium 0.589 0.556089
## country_nameBenin 3.273 0.001169 **
## country_nameBosnia and Herzegovina 0.671 0.502771
## country_nameBotswana 0.829 0.407561
## country_nameBrazil 37.080 < 2e-16 ***
## country_nameBulgaria 1.873 0.061915 .
## country_nameCameroon 4.358 1.73e-05 ***
## country_nameCanada 1.444 0.149707
## country_nameChina 18.795 < 2e-16 ***
## country_nameColombia 9.652 < 2e-16 ***
## country_nameCongo 2.944 0.003458 **
## country_nameCosta Rica 1.026 0.305443
## country_nameCote dIvoire 5.839 1.19e-08 ***
## country_nameCroatia -0.157 0.875066
## country_nameCyprus -1.025 0.306278
## country_nameCzech Republic 0.520 0.603275
## country_nameDenmark -0.771 0.441453
## country_nameDominican Republic 2.387 0.017506 *
## country_nameEstonia -1.251 0.211870
## country_nameFinland -1.106 0.269620
## country_nameFrance 6.272 1.05e-09 ***
## country_nameGeorgia 3.331 0.000957 ***
## country_nameGermany 6.906 2.36e-11 ***
## country_nameGreece -0.030 0.976189
## country_nameHungary 1.259 0.208700
## country_nameIceland -1.617 0.106852
## country_nameIreland -1.033 0.302226
## country_nameIsrael -0.752 0.452415
## country_nameItaly 4.513 8.74e-06 ***
## country_nameJamaica 1.111 0.267493
## country_nameJapan 8.736 < 2e-16 ***
## country_nameKazakhstan 1.022 0.307489
## country_nameKorea, Republic of 3.130 0.001895 **
## country_nameKyrgyzstan 2.871 0.004343 **
## country_nameLatvia -0.802 0.423101
## country_nameLithuania -0.614 0.539883
## country_nameLuxembourg -1.887 0.059961 .
## country_nameMacedonia, the former Yugoslav Republic of 0.940 0.347962
## country_nameMalta -1.240 0.215870
## country_nameMexico 9.700 < 2e-16 ***
## country_nameMoldova, Republic of 3.619 0.000339 ***
## country_nameMontenegro 0.010 0.992396
## country_nameMorocco 7.226 3.12e-12 ***
## country_nameMyanmar 6.339 7.09e-10 ***
## country_nameNetherlands 0.844 0.399173
## country_nameNew Zealand -0.130 0.896267
## country_nameNorway -1.239 0.216196
## country_namePhilippines 12.468 < 2e-16 ***
## country_namePoland 5.266 2.44e-07 ***
## country_namePortugal -0.183 0.855094
## country_nameRomania 2.251 0.024975 *
## country_nameRussian Federation 20.562 < 2e-16 ***
## country_nameSenegal 5.115 5.16e-07 ***
## country_nameSerbia 3.323 0.000984 ***
## country_nameSlovakia 0.132 0.895172
## country_nameSlovenia -1.044 0.297405
## country_nameSpain 3.283 0.001129 **
## country_nameSweden -0.902 0.367761
## country_nameSwitzerland -0.896 0.370655
## country_nameTajikistan 3.651 0.000301 ***
## country_nameThailand 19.658 < 2e-16 ***
## country_nameTogo 4.216 3.16e-05 ***
## country_nameTunisia 4.091 5.32e-05 ***
## country_nameTurkey 9.340 < 2e-16 ***
## country_nameUkraine 12.307 < 2e-16 ***
## country_nameUnited Kingdom 3.544 0.000448 ***
## country_nameUnited States of America 25.696 < 2e-16 ***
## country_nameUruguay -0.153 0.878207
## country_nameVenezuela 2.365 0.018574 *
## country_nameViet Nam 12.979 < 2e-16 ***
## country_nameZimbabwe 5.008 8.72e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01382 on 351 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9978, Adjusted R-squared: 0.9973
## F-statistic: 1981 on 82 and 351 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -2.0665401455
## PKcal -1.7043008421
## calperg_food_w_calorie -0.0001040343
## log(GDP_pcap_thous2015USD_FAO) 0.0044269698
## year -0.0009447397
## country_nameAlgeria 0.0882717520
## country_nameArgentina 0.1184213924
## country_nameArmenia -0.0216752279
## country_nameAustralia 0.0217323197
## country_nameAustria -0.1046111043
## country_nameAzerbaijan 0.0059431908
## country_nameBelarus 0.0103371101
## country_nameBelgium -0.0626295546
## country_nameBenin 0.0346131787
## country_nameBosnia and Herzegovina -0.0119696907
## country_nameBotswana -0.0206436833
## country_nameBrazil 1.2251546878
## country_nameBulgaria -0.0018641832
## country_nameCameroon 0.0483400356
## country_nameCanada -0.0237142276
## country_nameChina 3.6385943346
## country_nameColombia 0.1162988706
## country_nameCongo 0.0185240499
## country_nameCosta Rica -0.0251275582
## country_nameCote dIvoire 0.0701492510
## country_nameCroatia -0.0513685982
## country_nameCyprus -0.1092562879
## country_nameCzech Republic -0.0448030622
## country_nameDenmark -0.1320203202
## country_nameDominican Republic 0.0061978384
## country_nameEstonia -0.0909526545
## country_nameFinland -0.1357255311
## country_nameFrance 0.1868507620
## country_nameGeorgia 0.0184514813
## country_nameGermany 0.2131801352
## country_nameGreece -0.0618926718
## country_nameHungary -0.0197190505
## country_nameIceland -0.1678489277
## country_nameIreland -0.1404517041
## country_nameIsrael -0.1177171527
## country_nameItaly 0.1013005118
## country_nameJamaica -0.0129931893
## country_nameJapan 0.2875102352
## country_nameKazakhstan -0.0178435629
## country_nameKorea, Republic of 0.0432534166
## country_nameKyrgyzstan 0.0202663913
## country_nameLatvia -0.0672409483
## country_nameLithuania -0.0638426436
## country_nameLuxembourg -0.2254041719
## country_nameMacedonia, the former Yugoslav Republic of -0.0109573937
## country_nameMalta -0.1101714294
## country_nameMexico 0.2155645660
## country_nameMoldova, Republic of 0.0353347647
## country_nameMontenegro -0.0287078344
## country_nameMorocco 0.0919538761
## country_nameMyanmar 0.1237297073
## country_nameNetherlands -0.0500570727
## country_nameNew Zealand -0.0925738366
## country_nameNorway -0.1705550703
## country_namePhilippines 0.2360041852
## country_namePoland 0.0819426095
## country_namePortugal -0.0659668418
## country_nameRomania 0.0045733315
## country_nameRussian Federation 0.5164482404
## country_nameSenegal 0.0915121939
## country_nameSerbia 0.0175932425
## country_nameSlovakia -0.0584976734
## country_nameSlovenia -0.0994104627
## country_nameSpain 0.0453604241
## country_nameSweden -0.1344336679
## country_nameSwitzerland -0.1616189106
## country_nameTajikistan 0.0421314850
## country_nameThailand 0.3782534163
## country_nameTogo 0.0712473683
## country_nameTunisia 0.0265714115
## country_nameTurkey 0.1676136372
## country_nameUkraine 0.1464241728
## country_nameUnited Kingdom 0.0687732485
## country_nameUnited States of America 1.5750175694
## country_nameUruguay -0.0667290730
## country_nameVenezuela 0.0119292962
## country_nameViet Nam 0.2498531766
## country_nameZimbabwe 0.0858351573
## 97.5 %
## (Intercept) 1.909501e+00
## PKcal -1.170704e+00
## calperg_food_w_calorie -2.966513e-05
## log(GDP_pcap_thous2015USD_FAO) 7.029230e-02
## year 1.058633e-03
## country_nameAlgeria 1.493315e-01
## country_nameArgentina 2.449740e-01
## country_nameArmenia 2.334756e-02
## country_nameAustralia 2.057831e-01
## country_nameAustria 8.100190e-02
## country_nameAzerbaijan 5.754324e-02
## country_nameBelarus 5.934834e-02
## country_nameBelgium 1.162083e-01
## country_nameBenin 1.388269e-01
## country_nameBosnia and Herzegovina 2.436185e-02
## country_nameBotswana 5.073894e-02
## country_nameBrazil 1.362400e+00
## country_nameBulgaria 7.625852e-02
## country_nameCameroon 1.278678e-01
## country_nameCanada 1.546349e-01
## country_nameChina 4.489089e+00
## country_nameColombia 1.758200e-01
## country_nameCongo 9.310298e-02
## country_nameCosta Rica 7.997386e-02
## country_nameCote dIvoire 1.414015e-01
## country_nameCroatia 4.375835e-02
## country_nameCyprus 3.441309e-02
## country_nameCzech Republic 7.702398e-02
## country_nameDenmark 5.768815e-02
## country_nameDominican Republic 6.417945e-02
## country_nameEstonia 2.024095e-02
## country_nameFinland 3.803762e-02
## country_nameFrance 3.575766e-01
## country_nameGeorgia 7.165301e-02
## country_nameGermany 3.829675e-01
## country_nameGreece 6.004094e-02
## country_nameHungary 8.994678e-02
## country_nameIceland 1.639877e-02
## country_nameIreland 4.370741e-02
## country_nameIsrael 5.258186e-02
## country_nameItaly 2.578027e-01
## country_nameJamaica 4.670426e-02
## country_nameJapan 4.545841e-01
## country_nameKazakhstan 5.644823e-02
## country_nameKorea, Republic of 1.895168e-01
## country_nameKyrgyzstan 1.084495e-01
## country_nameLatvia 2.828702e-02
## country_nameLithuania 3.347970e-02
## country_nameLuxembourg 4.653540e-03
## country_nameMacedonia, the former Yugoslav Republic of 3.101287e-02
## country_nameMalta 2.497571e-02
## country_nameMexico 3.252108e-01
## country_nameMoldova, Republic of 1.194452e-01
## country_nameMontenegro 2.898761e-02
## country_nameMorocco 1.607230e-01
## country_nameMyanmar 2.350338e-01
## country_nameNetherlands 1.253356e-01
## country_nameNew Zealand 8.105533e-02
## country_nameNorway 3.872214e-02
## country_namePhilippines 3.244010e-01
## country_namePoland 1.796421e-01
## country_namePortugal 5.474947e-02
## country_nameRomania 6.775706e-02
## country_nameRussian Federation 6.256929e-01
## country_nameSenegal 2.058346e-01
## country_nameSerbia 6.861725e-02
## country_nameSlovakia 6.690514e-02
## country_nameSlovenia 3.048647e-02
## country_nameSpain 1.808780e-01
## country_nameSweden 4.990588e-02
## country_nameSwitzerland 6.041915e-02
## country_nameTajikistan 1.405418e-01
## country_nameThailand 4.623547e-01
## country_nameTogo 1.958298e-01
## country_nameTunisia 7.576619e-02
## country_nameTurkey 2.570343e-01
## country_nameUkraine 2.021223e-01
## country_nameUnited Kingdom 2.402948e-01
## country_nameUnited States of America 1.836099e+00
## country_nameUruguay 5.707557e-02
## country_nameVenezuela 1.297578e-01
## country_nameViet Nam 3.391027e-01
## country_nameZimbabwe 1.968465e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30757 -0.01243 0.00016 0.00979 0.42756
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.436e+00 3.752e+00 0.916 0.36036
## staples -1.884e+00 2.502e-01 -7.531 3.02e-13 ***
## nonstaples_animal 3.199e+00 1.051e+00 3.044 0.00248 **
## nonstaples_other 5.858e+00 4.880e-01 12.003 < 2e-16 ***
## calperg_food_w_calorie -5.013e-07 1.355e-05 -0.037 0.97051
## log(GDP_pcap_thous2015USD_FAO) -2.976e-03 2.910e-03 -1.023 0.30707
## year -1.706e-03 1.864e-03 -0.915 0.36069
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06655 on 427 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9392, Adjusted R-squared: 0.9384
## F-statistic: 1100 on 6 and 427 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.939229e+00 1.081069e+01
## staples -2.376240e+00 -1.392623e+00
## nonstaples_animal 1.133707e+00 5.264421e+00
## nonstaples_other 4.898870e+00 6.817391e+00
## calperg_food_w_calorie -2.713688e-05 2.613436e-05
## log(GDP_pcap_thous2015USD_FAO) -8.696519e-03 2.744237e-03
## year -5.369475e-03 1.958185e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30764 -0.01161 0.00000 0.00981 0.42675
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.456e+00 3.753e+00 0.921 0.3576
## staples -1.871e+00 2.466e-01 -7.586 2.08e-13 ***
## nonstaples_animal 3.158e+00 1.042e+00 3.030 0.0026 **
## nonstaples_other 5.865e+00 4.877e-01 12.026 < 2e-16 ***
## calperg_food_w_calorie 8.860e-07 1.344e-05 0.066 0.9475
## GDP_pcap_thous2015USD_FAO -1.597e-04 1.634e-04 -0.977 0.3291
## year -1.719e-03 1.864e-03 -0.922 0.3571
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06656 on 427 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9392, Adjusted R-squared: 0.9384
## F-statistic: 1099 on 6 and 427 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.920164e+00 1.083172e+01
## staples -2.355814e+00 -1.386266e+00
## nonstaples_animal 1.109266e+00 5.206769e+00
## nonstaples_other 4.906520e+00 6.823694e+00
## calperg_food_w_calorie -2.552384e-05 2.729591e-05
## GDP_pcap_thous2015USD_FAO -4.809206e-04 1.615331e-04
## year -5.382941e-03 1.945651e-03
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31176 -0.01173 0.00024 0.01046 0.42860
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -1.884e+00 2.502e-01 -7.530 3.04e-13 ***
## nonstaples_animal 3.202e+00 1.051e+00 3.047 0.00245 **
## nonstaples_other 5.855e+00 4.879e-01 11.999 < 2e-16 ***
## calperg_food_w_calorie -7.801e-08 1.354e-05 -0.006 0.99541
## log(GDP_pcap_thous2015USD_FAO) -2.971e-03 2.910e-03 -1.021 0.30788
## year 1.165e-06 1.237e-05 0.094 0.92502
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06654 on 428 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9462, Adjusted R-squared: 0.9454
## F-statistic: 1254 on 6 and 428 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -2.375437e+00 -1.392017e+00
## nonstaples_animal 1.136665e+00 5.266558e+00
## nonstaples_other 4.895624e+00 6.813713e+00
## calperg_food_w_calorie -2.669293e-05 2.653691e-05
## log(GDP_pcap_thous2015USD_FAO) -8.689866e-03 2.748629e-03
## year -2.315175e-05 2.548171e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43966 -0.03989 -0.01956 0.00266 0.69599
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.241e+00 2.879e-02 43.099 < 2e-16 ***
## calperg_food_w_calorie 3.200e-05 2.313e-05 1.384 0.1672
## log(GDP_pcap_thous2015USD_FAO) 1.988e-02 4.554e-03 4.365 1.59e-05 ***
## year -3.860e-05 2.138e-05 -1.805 0.0717 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1157 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8364, Adjusted R-squared: 0.8349
## F-statistic: 549.6 on 4 and 430 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.184365e+00 1.297550e+00
## calperg_food_w_calorie -1.345807e-05 7.745754e-05
## log(GDP_pcap_thous2015USD_FAO) 1.092990e-02 2.883219e-02
## year -8.061709e-05 3.424631e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43454 -0.03977 -0.02100 0.00196 0.65781
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.264e+00 2.870e-02 44.056 < 2e-16 ***
## staples_frac -4.140e-01 9.438e-02 -4.386 1.46e-05 ***
## calperg_food_w_calorie 5.905e-05 2.348e-05 2.515 0.0123 *
## log(GDP_pcap_thous2015USD_FAO) -9.615e-03 8.070e-03 -1.191 0.2341
## year 6.072e-05 3.084e-05 1.969 0.0496 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1133 on 429 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8434, Adjusted R-squared: 0.8416
## F-statistic: 462.2 on 5 and 429 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.207829e+00 1.3206342401
## staples_frac -5.994681e-01 -0.2284430548
## calperg_food_w_calorie 1.290346e-05 0.0001051921
## log(GDP_pcap_thous2015USD_FAO) -2.547637e-02 0.0062468660
## year 1.019418e-07 0.0001213470
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43403 -0.04019 -0.02098 0.00185 0.65766
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.264e+00 2.869e-02 44.059 < 2e-16 ***
## nonstaples_frac 4.144e-01 9.438e-02 4.390 1.43e-05 ***
## calperg_food_w_calorie 5.903e-05 2.347e-05 2.515 0.0123 *
## log(GDP_pcap_thous2015USD_FAO) -9.643e-03 8.070e-03 -1.195 0.2328
## year -1.450e-04 3.203e-05 -4.527 7.75e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1133 on 429 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8434, Adjusted R-squared: 0.8416
## F-statistic: 462.2 on 5 and 429 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.207848e+00 1.320647e+00
## nonstaples_frac 2.288498e-01 5.998545e-01
## calperg_food_w_calorie 1.288866e-05 1.051619e-04
## log(GDP_pcap_thous2015USD_FAO) -2.550360e-02 6.217895e-03
## year -2.079864e-04 -8.206449e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30752 -0.01386 -0.00263 0.00985 0.43326
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 5.002e+00 1.323e-01 37.807 <2e-16 ***
## staples_frac -6.228e-02 5.689e-02 -1.095 0.274
## calperg_food_w_calorie 8.376e-06 1.393e-05 0.601 0.548
## log(GDP_pcap_thous2015USD_FAO) -8.885e-03 4.748e-03 -1.871 0.062 .
## year 1.502e-05 1.822e-05 0.824 0.410
## PKcal:staples_frac -7.238e+00 2.541e-01 -28.484 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06669 on 428 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9459, Adjusted R-squared: 0.9452
## F-statistic: 1248 on 6 and 428 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 4.741889e+00 5.261971e+00
## staples_frac -1.740954e-01 4.952611e-02
## calperg_food_w_calorie -1.899691e-05 3.574930e-05
## log(GDP_pcap_thous2015USD_FAO) -1.821769e-02 4.468501e-04
## year -2.078716e-05 5.082534e-05
## PKcal:staples_frac -7.737319e+00 -6.738439e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141836 -0.007919 0.000211 0.009788 0.133846
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef -2.782e+00 4.446e+00 -0.626 0.531839
## Corn -6.465e+00 8.240e-01 -7.845 3.80e-14 ***
## Dairy 3.474e+00 2.505e+00 1.387 0.166170
## FiberCrop 8.983e+01 1.256e+01 7.151 4.00e-12 ***
## Fruits -1.161e+01 2.983e+00 -3.894 0.000115 ***
## Legumes -7.948e-01 5.322e+00 -0.149 0.881361
## MiscCrop 1.348e+01 1.180e+01 1.143 0.253796
## NutsSeeds 7.714e+00 5.038e+00 1.531 0.126506
## OilCrop -2.475e+00 1.454e+00 -1.703 0.089328 .
## OilPalm -1.712e+01 3.665e+00 -4.671 4.08e-06 ***
## OtherGrain -1.356e+01 2.236e+00 -6.062 3.06e-09 ***
## OtherMeat_Fish -1.062e+01 4.260e+00 -2.493 0.013078 *
## Poultry 2.040e+01 3.779e+00 5.398 1.14e-07 ***
## Rice 1.404e+00 6.165e-01 2.278 0.023256 *
## RootTuber 5.793e+00 1.648e+00 3.516 0.000488 ***
## SheepGoat -1.759e+01 1.598e+01 -1.101 0.271488
## Soybean 9.125e+00 1.471e+00 6.204 1.35e-09 ***
## SugarCrop 1.968e+01 1.936e+00 10.166 < 2e-16 ***
## Vegetables -2.574e+00 4.410e+00 -0.584 0.559796
## Wheat -1.591e+00 5.735e-01 -2.775 0.005777 **
## NEC -3.715e+00 1.656e+00 -2.243 0.025421 *
## Pork 2.271e+00 1.793e+00 1.267 0.205905
## calperg_food_w_calorie -3.105e-06 7.075e-06 -0.439 0.660986
## log(GDP_pcap_thous2015USD_FAO) 4.356e-03 1.461e-03 2.981 0.003042 **
## year -1.492e-06 6.313e-06 -0.236 0.813310
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02784 on 409 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.991, Adjusted R-squared: 0.9904
## F-statistic: 1801 on 25 and 409 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -1.152076e+01 5.957284e+00
## Corn -8.084259e+00 -4.844743e+00
## Dairy -1.449431e+00 8.397836e+00
## FiberCrop 6.513526e+01 1.145240e+02
## Fruits -1.747898e+01 -5.750753e+00
## Legumes -1.125734e+01 9.667696e+00
## MiscCrop -9.708529e+00 3.667045e+01
## NutsSeeds -2.189670e+00 1.761733e+01
## OilCrop -5.332776e+00 3.819695e-01
## OilPalm -2.432096e+01 -9.913085e+00
## OtherGrain -1.795152e+01 -9.159526e+00
## OtherMeat_Fish -1.899181e+01 -2.243923e+00
## Poultry 1.296964e+01 2.782557e+01
## Rice 1.923301e-01 2.616075e+00
## RootTuber 2.553679e+00 9.031771e+00
## SheepGoat -4.899704e+01 1.381372e+01
## Soybean 6.233496e+00 1.201552e+01
## SugarCrop 1.587721e+01 2.348991e+01
## Vegetables -1.124277e+01 6.095264e+00
## Wheat -2.718548e+00 -4.639251e-01
## NEC -6.970192e+00 -4.593611e-01
## Pork -1.252852e+00 5.795284e+00
## calperg_food_w_calorie -1.701360e-05 1.080331e-05
## log(GDP_pcap_thous2015USD_FAO) 1.483569e-03 7.227489e-03
## year -1.390222e-05 1.091848e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46441 -0.04115 -0.02236 -0.00360 0.76004
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.629e-06 4.297e-08 37.907 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.990e-02 4.964e-03 4.010 7.16e-05 ***
## year -6.447e-06 6.697e-06 -0.963 0.336
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1286 on 431 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.7974, Adjusted R-squared: 0.796
## F-statistic: 565.5 on 3 and 431 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.544241e-06 1.713139e-06
## log(GDP_pcap_thous2015USD_FAO) 1.014737e-02 2.965931e-02
## year -1.960883e-05 6.715557e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36275 -0.01172 0.00100 0.00455 0.57556
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -2.668e-07 7.515e-08 -3.550 0.000428 ***
## Feed_Kt 7.337e-06 2.726e-07 26.918 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 8.277e-04 3.114e-03 0.266 0.790551
## year -2.974e-06 4.094e-06 -0.727 0.467873
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07859 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9245, Adjusted R-squared: 0.9238
## F-statistic: 1317 on 4 and 430 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -4.144814e-07 -1.190669e-07
## Feed_Kt 6.801674e-06 7.873199e-06
## log(GDP_pcap_thous2015USD_FAO) -5.293619e-03 6.948978e-03
## year -1.102020e-05 5.071531e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.39151 -0.01255 -0.00087 0.00343 0.58441
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -1.340e-01 6.496e-02 -2.063 0.0397 *
## Feed_Kt 7.059e-06 3.193e-07 22.110 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.713e-03 3.156e-03 0.543 0.5876
## year -3.071e-06 4.149e-06 -0.740 0.4596
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07934 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9231, Adjusted R-squared: 0.9224
## F-statistic: 1290 on 4 and 430 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -2.616676e-01 -6.320547e-03
## Feed_Kt 6.431254e-06 7.686245e-06
## log(GDP_pcap_thous2015USD_FAO) -4.490016e-03 7.915532e-03
## year -1.122711e-05 5.084296e-06
## png
## 2
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~nonstaples_other,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs non-meat nonstaples food production")
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_5 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
TRUE ~ ">= 30"))) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
text = ~country_name,
color = ~GDP_group) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP")
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~staples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
layout(xaxis = list(title = "Fraction of calories from staples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs staples fraction")
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
print(summary(lm(EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO, comb_data_sel_5)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO, data = comb_data_sel_5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.9125 -0.8027 -0.2854 0.3906 5.1864
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.10476 0.08068 13.69 <2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.02809 0.00272 10.33 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.217 on 432 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.198, Adjusted R-squared: 0.1962
## F-statistic: 106.7 on 1 and 432 DF, p-value: < 2.2e-16
print(summary(lm(EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO + staples_frac, comb_data_sel_5)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO + staples_frac,
## data = comb_data_sel_5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2128 -0.6749 -0.2340 0.3324 5.0522
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.153540 0.317780 13.070 <2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.007794 0.003208 2.429 0.0155 *
## staples_frac -6.181263 0.627071 -9.857 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.101 on 431 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.3456, Adjusted R-squared: 0.3425
## F-statistic: 113.8 on 2 and 431 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ log(staples_frac), comb_data_sel_5))
##
## Call:
## lm(formula = EJ_per_PKcal ~ log(staples_frac), data = comb_data_sel_5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.4646 -0.6977 -0.2630 0.3963 5.1294
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.2084 0.1944 -6.215 1.2e-09 ***
## log(staples_frac) -3.2441 0.2112 -15.360 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.09 on 438 degrees of freedom
## Multiple R-squared: 0.3501, Adjusted R-squared: 0.3486
## F-statistic: 235.9 on 1 and 438 DF, p-value: < 2.2e-16
lm_to_plot2 <- lm(EJ_per_PKcal ~ exp(nonstaples_frac), comb_data_sel_5)
lm_to_plot2_summary <- summary(lm_to_plot2)
print(lm_to_plot2_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ exp(nonstaples_frac), data = comb_data_sel_5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3623 -0.7130 -0.2682 0.3851 5.1298
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.8060 0.5032 -11.54 <2e-16 ***
## exp(nonstaples_frac) 4.1814 0.2799 14.94 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.101 on 438 degrees of freedom
## Multiple R-squared: 0.3375, Adjusted R-squared: 0.336
## F-statistic: 223.1 on 1 and 438 DF, p-value: < 2.2e-16
lm_to_plot <- lm(EJ_per_PKcal ~ nonstaples_frac, comb_data_sel_5)
lm_to_plot_summary <- summary(lm_to_plot)
print(lm_to_plot_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ nonstaples_frac, data = comb_data_sel_5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2830 -0.7100 -0.2682 0.3846 5.1436
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.3689 0.2827 -8.378 7.37e-16 ***
## nonstaples_frac 7.0214 0.4829 14.541 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.111 on 438 degrees of freedom
## Multiple R-squared: 0.3256, Adjusted R-squared: 0.324
## F-statistic: 211.4 on 1 and 438 DF, p-value: < 2.2e-16
print(summary(lm(EJ_per_PKcal ~ exp(nonstaples_frac) + GDP_pcap_thous2015USD_FAO, comb_data_sel_5)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ exp(nonstaples_frac) + GDP_pcap_thous2015USD_FAO,
## data = comb_data_sel_5)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3072 -0.6835 -0.2279 0.3564 5.0530
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -5.235102 0.624716 -8.380 7.56e-16 ***
## exp(nonstaples_frac) 3.801941 0.372105 10.217 < 2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.006131 0.003254 1.884 0.0602 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.093 on 431 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.3544, Adjusted R-squared: 0.3514
## F-statistic: 118.3 on 2 and 431 DF, p-value: < 2.2e-16
# get key values from the model to plot
pval <- lm_to_plot_summary$coef[2,4]
Rsq <- lm_to_plot_summary$adj.r.squared
slope <- lm_to_plot_summary$coef[[2]]
# plot
x_for_lin_reg_plot <- c(0,1)
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
# get key values from the model to plot
pval <- lm_to_plot2_summary$coef[2,4]
Rsq <- lm_to_plot2_summary$adj.r.squared
slope <- lm_to_plot2_summary$coef[[2]]
# plot
x_for_lin_reg_plot <- c(0,1)
plot_ly(comb_data_sel_5) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot2, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
Mean-centered.
# mean-center GDP per capita, food production, and calories per g
comb_data_sel_5_cent <- comb_data_sel_5 %>%
ungroup() %>%
mutate(PKcal = PKcal - mean(PKcal),
calperg_food_w_calorie = calperg_food_w_calorie - mean(calperg_food_w_calorie),
GDP_pcap_thous2015USD_FAO = GDP_pcap_thous2015USD_FAO - mean(GDP_pcap_thous2015USD_FAO, na.rm = TRUE),
GDP_pcap_thous2015USD_calc = GDP_pcap_thous2015USD_calc - mean(GDP_pcap_thous2015USD_calc, na.rm = TRUE))
calc_lin_model_food_en_use_production(comb_data_sel_5_cent, "5cent")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44862 -0.02912 -0.02231 -0.00940 0.69588
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.09599 0.00559 17.17 <2e-16 ***
## PKcal 1.23539 0.02890 42.74 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1173 on 438 degrees of freedom
## Multiple R-squared: 0.8066, Adjusted R-squared: 0.8062
## F-statistic: 1827 on 1 and 438 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.35263 0.06687 0.07368 0.08659 0.79187
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.23539 0.03734 33.08 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1515 on 439 degrees of freedom
## Multiple R-squared: 0.7137, Adjusted R-squared: 0.7131
## F-statistic: 1094 on 1 and 439 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44758 -0.02880 -0.02056 -0.00905 0.69545
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.599e-02 5.595e-03 17.155 <2e-16 ***
## PKcal 1.237e+00 2.919e-02 42.387 <2e-16 ***
## calperg_food_w_calorie 1.068e-05 2.290e-05 0.466 0.641
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1174 on 437 degrees of freedom
## Multiple R-squared: 0.8067, Adjusted R-squared: 0.8058
## F-statistic: 912 on 2 and 437 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44216 -0.03474 -0.01438 -0.00424 0.70270
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.646e-02 5.590e-03 17.255 < 2e-16 ***
## PKcal 1.243e+00 2.901e-02 42.855 < 2e-16 ***
## calperg_food_w_calorie 2.103e-05 2.295e-05 0.916 0.360131
## GDP_pcap_thous2015USD_FAO 9.593e-04 2.620e-04 3.661 0.000282 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1165 on 430 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8126, Adjusted R-squared: 0.8113
## F-statistic: 621.4 on 3 and 430 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.093721 -0.031623 0.004548 0.026704 0.158997
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.193e-01 8.925e-03 13.368 <2e-16 ***
## PKcal 2.608e+00 4.250e-02 61.363 <2e-16 ***
## calperg_food_w_calorie -6.038e-05 3.144e-05 -1.921 0.0567 .
## log(GDP_pcap_thous2015USD_FAO) 6.497e-03 2.925e-03 2.221 0.0278 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0436 on 147 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9637, Adjusted R-squared: 0.9629
## F-statistic: 1300 on 3 and 147 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44081 -0.03540 -0.01561 -0.00275 0.69967
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.760e-02 5.760e-03 16.944 < 2e-16 ***
## PKcal 1.245e+00 2.950e-02 42.196 < 2e-16 ***
## calperg_food_w_calorie 2.920e-05 2.579e-05 1.132 0.258195
## GDP_pcap_thous2015USD_calc 8.086e-04 2.358e-04 3.429 0.000666 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1181 on 418 degrees of freedom
## (18 observations deleted due to missingness)
## Multiple R-squared: 0.8119, Adjusted R-squared: 0.8105
## F-statistic: 601.4 on 3 and 418 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.090352 -0.027143 0.006949 0.025576 0.164204
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.119447 0.009006 13.263 <2e-16 ***
## PKcal 2.595059 0.042330 61.306 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.006669 0.002950 2.261 0.0252 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04399 on 148 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9628, Adjusted R-squared: 0.9623
## F-statistic: 1913 on 2 and 148 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.08570 -0.03477 0.01041 0.02484 0.15986
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.1361459 0.0038891 35.007 < 2e-16 ***
## PKcal 2.1531288 0.1766732 12.187 < 2e-16 ***
## PKcal:calperg_food_w_calorie -0.0001547 0.0006906 -0.224 0.82306
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.1347033 0.0513418 2.624 0.00962 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04385 on 147 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9632, Adjusted R-squared: 0.9625
## F-statistic: 1284 on 3 and 147 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.088887 -0.012907 -0.003424 0.014733 0.128759
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.416e-02 1.302e-02 -1.088 0.278
## PKcal -3.664e-01 2.518e-01 -1.455 0.148
## calperg_food_w_calorie -3.989e-06 2.967e-05 -0.134 0.893
## log(GDP_pcap_thous2015USD_FAO) 4.923e-02 4.124e-03 11.937 <2e-16 ***
## PKcal:calperg_food_w_calorie 1.849e-04 6.383e-04 0.290 0.772
## PKcal:log(GDP_pcap_thous2015USD_FAO) 8.680e-01 7.283e-02 11.918 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03069 on 145 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9822, Adjusted R-squared: 0.9816
## F-statistic: 1604 on 5 and 145 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.990051e-02 1.157069e-02
## PKcal -8.640966e-01 1.313433e-01
## calperg_food_w_calorie -6.263198e-05 5.465342e-05
## log(GDP_pcap_thous2015USD_FAO) 4.107885e-02 5.738074e-02
## PKcal:calperg_food_w_calorie -1.076645e-03 1.446534e-03
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.240296e-01 1.011907e+00
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.091193 -0.032912 0.005524 0.028210 0.156502
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.111e+00 4.188e+00 0.504 0.6149
## PKcal 2.608e+00 4.262e-02 61.200 <2e-16 ***
## calperg_food_w_calorie -5.918e-05 3.162e-05 -1.871 0.0633 .
## log(GDP_pcap_thous2015USD_FAO) 6.652e-03 2.950e-03 2.255 0.0256 *
## year -9.900e-04 2.081e-03 -0.476 0.6350
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04371 on 146 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9637, Adjusted R-squared: 0.9627
## F-statistic: 969.7 on 4 and 146 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -6.1655885746 1.038802e+01
## PKcal 2.5239026607 2.692353e+00
## calperg_food_w_calorie -0.0001216782 3.317679e-06
## log(GDP_pcap_thous2015USD_FAO) 0.0008210462 1.248321e-02
## year -0.0051036642 3.123667e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.044221 -0.001231 0.000093 0.001411 0.049858
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.065e+00 8.577e-01 -1.242 0.216829
## PKcal -1.630e+00 4.332e-01 -3.762 0.000262 ***
## calperg_food_w_calorie -2.939e-05 2.684e-05 -1.095 0.275733
## log(GDP_pcap_thous2015USD_FAO) 3.110e-04 1.797e-03 0.173 0.862920
## year 5.767e-04 4.243e-04 1.359 0.176686
## country_nameAustria -1.434e-01 1.086e-02 -13.198 < 2e-16 ***
## country_nameBelgium -1.065e-01 9.566e-03 -11.132 < 2e-16 ***
## country_nameCanada -5.906e-02 9.562e-03 -6.177 9.25e-09 ***
## country_nameCyprus -1.876e-01 1.365e-02 -13.745 < 2e-16 ***
## country_nameDenmark -1.564e-01 1.043e-02 -15.004 < 2e-16 ***
## country_nameFinland -1.697e-01 1.058e-02 -16.035 < 2e-16 ***
## country_nameFrance 1.464e-01 2.422e-02 6.046 1.72e-08 ***
## country_nameGermany 1.879e-01 3.442e-02 5.459 2.63e-07 ***
## country_nameGreece -1.481e-01 1.160e-02 -12.768 < 2e-16 ***
## country_nameIceland -1.936e-01 1.287e-02 -15.036 < 2e-16 ***
## country_nameIreland -1.671e-01 1.054e-02 -15.863 < 2e-16 ***
## country_nameIsrael -1.687e-01 1.061e-02 -15.894 < 2e-16 ***
## country_nameItaly 5.224e-02 2.292e-02 2.279 0.024439 *
## country_nameJapan 2.523e-01 4.239e-02 5.951 2.71e-08 ***
## country_nameKorea, Republic of -1.708e-02 1.533e-02 -1.114 0.267435
## country_nameLuxembourg -1.971e-01 1.339e-02 -14.721 < 2e-16 ***
## country_nameMalta -1.919e-01 1.472e-02 -13.036 < 2e-16 ***
## country_nameNetherlands -8.148e-02 5.817e-03 -14.006 < 2e-16 ***
## country_nameNew Zealand -1.442e-01 1.253e-02 -11.508 < 2e-16 ***
## country_nameNorway -1.697e-01 1.049e-02 -16.178 < 2e-16 ***
## country_nameSlovenia -1.864e-01 1.512e-02 -12.331 < 2e-16 ***
## country_nameSpain -1.905e-02 1.248e-02 -1.526 0.129600
## country_nameSweden -1.603e-01 8.619e-03 -18.599 < 2e-16 ***
## country_nameSwitzerland -1.544e-01 9.647e-03 -16.000 < 2e-16 ***
## country_nameUnited Kingdom 4.417e-02 2.182e-02 2.024 0.045177 *
## country_nameUnited States of America 1.668e+00 1.726e-01 9.662 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.007848 on 120 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.999, Adjusted R-squared: 0.9988
## F-statistic: 4158 on 30 and 120 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -2.7632023653 0.6333545377
## PKcal -2.4872722193 -0.7719187503
## calperg_food_w_calorie -0.0000825246 0.0000237515
## log(GDP_pcap_thous2015USD_FAO) -0.0032473740 0.0038693118
## year -0.0002634695 0.0014168309
## country_nameAustria -0.1648808571 -0.1218649655
## country_nameBelgium -0.1254293534 -0.0875504146
## country_nameCanada -0.0779933311 -0.0401288209
## country_nameCyprus -0.2146159519 -0.1605709446
## country_nameDenmark -0.1770812783 -0.1357953311
## country_nameFinland -0.1906570762 -0.1487484704
## country_nameFrance 0.0984767834 0.1943752342
## country_nameGermany 0.1197278307 0.2560173575
## country_nameGreece -0.1710836150 -0.1251467431
## country_nameIceland -0.2190437785 -0.1680678890
## country_nameIreland -0.1879818181 -0.1462632616
## country_nameIsrael -0.1896612680 -0.1476421286
## country_nameItaly 0.0068537675 0.0976211261
## country_nameJapan 0.1683371782 0.3362016282
## country_nameKorea, Republic of -0.0474334210 0.0132724670
## country_nameLuxembourg -0.2236515101 -0.1706240899
## country_nameMalta -0.2210693158 -0.1627697077
## country_nameNetherlands -0.0929930687 -0.0699577380
## country_nameNew Zealand -0.1690107669 -0.1193922705
## country_nameNorway -0.1904696552 -0.1489327249
## country_nameSlovenia -0.2163250001 -0.1564694611
## country_nameSpain -0.0437565759 0.0056630418
## country_nameSweden -0.1773739031 -0.1432434568
## country_nameSwitzerland -0.1734581762 -0.1352567613
## country_nameUnited Kingdom 0.0009644617 0.0873709795
## country_nameUnited States of America 1.3262366847 2.0098471998
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.060142 -0.020080 0.000265 0.014786 0.126551
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.425e+00 3.080e+00 0.787 0.4324
## staples -2.888e+00 4.903e-01 -5.889 2.62e-08 ***
## nonstaples_animal 2.233e+00 9.002e-01 2.481 0.0143 *
## nonstaples_other 6.543e+00 6.337e-01 10.325 < 2e-16 ***
## calperg_food_w_calorie 3.231e-05 2.472e-05 1.307 0.1933
## log(GDP_pcap_thous2015USD_FAO) 4.220e-03 2.204e-03 1.915 0.0575 .
## year -1.210e-03 1.531e-03 -0.790 0.4307
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03213 on 144 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9807, Adjusted R-squared: 0.9799
## F-statistic: 1217 on 6 and 144 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.663399e+00 8.513626e+00
## staples -3.856748e+00 -1.918404e+00
## nonstaples_animal 4.539122e-01 4.012556e+00
## nonstaples_other 5.290882e+00 7.796084e+00
## calperg_food_w_calorie -1.655626e-05 8.117584e-05
## log(GDP_pcap_thous2015USD_FAO) -1.353245e-04 8.575457e-03
## year -4.235847e-03 1.816186e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.30764 -0.01161 0.00000 0.00981 0.42675
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.454e+00 3.752e+00 0.921 0.3578
## staples -1.871e+00 2.466e-01 -7.586 2.08e-13 ***
## nonstaples_animal 3.158e+00 1.042e+00 3.030 0.0026 **
## nonstaples_other 5.865e+00 4.877e-01 12.026 < 2e-16 ***
## calperg_food_w_calorie 8.860e-07 1.344e-05 0.066 0.9475
## GDP_pcap_thous2015USD_FAO -1.597e-04 1.634e-04 -0.977 0.3291
## year -1.719e-03 1.864e-03 -0.922 0.3571
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06656 on 427 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9392, Adjusted R-squared: 0.9384
## F-statistic: 1099 on 6 and 427 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.920494e+00 1.082850e+01
## staples -2.355814e+00 -1.386266e+00
## nonstaples_animal 1.109266e+00 5.206769e+00
## nonstaples_other 4.906520e+00 6.823694e+00
## calperg_food_w_calorie -2.552384e-05 2.729591e-05
## GDP_pcap_thous2015USD_FAO -4.809206e-04 1.615331e-04
## year -5.382941e-03 1.945651e-03
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.062210 -0.017737 0.000766 0.016412 0.129585
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -2.882e+00 4.896e-01 -5.887 2.62e-08 ***
## nonstaples_animal 2.255e+00 8.986e-01 2.510 0.0132 *
## nonstaples_other 6.527e+00 6.326e-01 10.319 < 2e-16 ***
## calperg_food_w_calorie 3.071e-05 2.461e-05 1.248 0.2140
## log(GDP_pcap_thous2015USD_FAO) 4.029e-03 2.187e-03 1.842 0.0675 .
## year -4.542e-06 3.446e-06 -1.318 0.1895
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03209 on 145 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9842, Adjusted R-squared: 0.9836
## F-statistic: 1508 on 6 and 145 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -3.850259e+00 -1.914739e+00
## nonstaples_animal 4.793910e-01 4.031419e+00
## nonstaples_other 5.276891e+00 7.777312e+00
## calperg_food_w_calorie -1.792240e-05 7.934638e-05
## log(GDP_pcap_thous2015USD_FAO) -2.939298e-04 8.352021e-03
## year -1.135229e-05 2.268256e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.093872 -0.031703 0.004482 0.026654 0.159149
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.608e+00 4.251e-02 61.357 <2e-16 ***
## calperg_food_w_calorie -6.045e-05 3.144e-05 -1.923 0.0565 .
## log(GDP_pcap_thous2015USD_FAO) 6.491e-03 2.926e-03 2.219 0.0280 *
## year 5.930e-05 4.436e-06 13.366 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0436 on 147 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9705, Adjusted R-squared: 0.9697
## F-statistic: 1209 on 4 and 147 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.524182e+00 2.692194e+00
## calperg_food_w_calorie -1.225885e-04 1.685859e-06
## log(GDP_pcap_thous2015USD_FAO) 7.090226e-04 1.227205e-02
## year 5.053051e-05 6.806553e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.077795 -0.022266 0.009056 0.024310 0.148706
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.599e+00 3.864e-02 67.256 < 2e-16 ***
## staples_frac -4.142e-01 7.290e-02 -5.682 6.98e-08 ***
## calperg_food_w_calorie -4.290e-05 2.872e-05 -1.494 0.137
## log(GDP_pcap_thous2015USD_FAO) -1.746e-03 3.026e-03 -0.577 0.565
## year 1.406e-04 1.486e-05 9.459 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03959 on 146 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9758, Adjusted R-squared: 0.975
## F-statistic: 1179 on 5 and 146 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.522156e+00 2.674873e+00
## staples_frac -5.582899e-01 -2.701409e-01
## calperg_food_w_calorie -9.965027e-05 1.386015e-05
## log(GDP_pcap_thous2015USD_FAO) -7.726958e-03 4.234838e-03
## year 1.112158e-04 1.699664e-04
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.077241 -0.022112 0.009077 0.024403 0.148168
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 2.598e+00 3.862e-02 67.281 < 2e-16 ***
## nonstaples_frac 4.149e-01 7.286e-02 5.694 6.58e-08 ***
## calperg_food_w_calorie -4.262e-05 2.871e-05 -1.484 0.13988
## log(GDP_pcap_thous2015USD_FAO) -1.728e-03 3.022e-03 -0.572 0.56833
## year -6.549e-05 2.228e-05 -2.939 0.00383 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03958 on 146 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9759, Adjusted R-squared: 0.975
## F-statistic: 1180 on 5 and 146 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 2.522158e+00 2.674815e+00
## nonstaples_frac 2.709107e-01 5.589177e-01
## calperg_food_w_calorie -9.935776e-05 1.412647e-05
## log(GDP_pcap_thous2015USD_FAO) -7.701328e-03 4.244932e-03
## year -1.095228e-04 -2.145381e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.062295 -0.012800 0.004168 0.015614 0.128504
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 4.800e+00 2.752e-01 17.440 < 2e-16 ***
## staples_frac -4.275e-01 6.082e-02 -7.029 7.56e-11 ***
## calperg_food_w_calorie 1.883e-05 2.515e-05 0.749 0.455
## log(GDP_pcap_thous2015USD_FAO) 3.360e-03 2.602e-03 1.291 0.199
## year 1.334e-04 1.243e-05 10.732 < 2e-16 ***
## PKcal:staples_frac -7.359e+00 9.136e-01 -8.054 2.67e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03302 on 145 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9833, Adjusted R-squared: 0.9826
## F-statistic: 1423 on 6 and 145 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 4.256127e+00 5.344102e+00
## staples_frac -5.477266e-01 -3.072907e-01
## calperg_food_w_calorie -3.087459e-05 6.853344e-05
## log(GDP_pcap_thous2015USD_FAO) -1.783708e-03 8.503600e-03
## year 1.088258e-04 1.579574e-04
## PKcal:staples_frac -9.164254e+00 -5.552852e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.034543 -0.006964 -0.001210 0.006186 0.051816
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 1.438e+01 1.000e+01 1.437 0.153103
## Corn 3.394e+00 7.545e+00 0.450 0.653649
## Dairy 2.240e+01 3.364e+00 6.659 7.65e-10 ***
## FiberCrop 1.116e+02 2.262e+01 4.932 2.51e-06 ***
## Fruits -2.982e+01 1.062e+01 -2.808 0.005780 **
## Legumes 2.211e+01 1.229e+01 1.799 0.074354 .
## MiscCrop -1.061e+01 1.581e+01 -0.671 0.503521
## NutsSeeds 2.417e+01 1.431e+01 1.689 0.093678 .
## OilCrop 2.734e-01 2.435e+00 0.112 0.910781
## OilPalm 1.588e+01 8.885e+00 1.787 0.076392 .
## OtherGrain 9.500e+00 6.015e+00 1.579 0.116749
## OtherMeat_Fish 2.081e+01 9.188e+00 2.265 0.025241 *
## Poultry 1.500e+01 8.062e+00 1.860 0.065160 .
## Rice 5.476e+00 1.625e+00 3.370 0.000997 ***
## RootTuber 9.506e+00 8.015e+00 1.186 0.237873
## SheepGoat 4.383e+00 2.164e+01 0.203 0.839823
## Soybean 6.320e+00 4.610e+00 1.371 0.172890
## SugarCrop -1.037e+01 4.723e+00 -2.196 0.029891 *
## Vegetables -4.958e+01 1.339e+01 -3.702 0.000318 ***
## Wheat -2.097e+00 2.127e+00 -0.986 0.326070
## NEC -6.122e+00 3.733e+00 -1.640 0.103530
## Pork 3.759e-01 5.945e+00 0.063 0.949683
## calperg_food_w_calorie 4.039e-05 1.534e-05 2.633 0.009518 **
## log(GDP_pcap_thous2015USD_FAO) 5.849e-04 1.098e-03 0.533 0.595254
## year 2.451e-06 1.666e-06 1.471 0.143858
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01423 on 126 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9973, Adjusted R-squared: 0.9968
## F-statistic: 1866 on 25 and 126 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -5.417375e+00 3.416909e+01
## Corn -1.153821e+01 1.832547e+01
## Dairy 1.574567e+01 2.906142e+01
## FiberCrop 6.679578e+01 1.563074e+02
## Fruits -5.083494e+01 -8.803734e+00
## Legumes -2.206697e+00 4.642206e+01
## MiscCrop -4.189437e+01 2.068089e+01
## NutsSeeds -4.147856e+00 5.248254e+01
## OilCrop -4.545246e+00 5.092027e+00
## OilPalm -1.708450e+00 3.345928e+01
## OtherGrain -2.403230e+00 2.140250e+01
## OtherMeat_Fish 2.625042e+00 3.898994e+01
## Poultry -9.558264e-01 3.095145e+01
## Rice 2.260724e+00 8.691423e+00
## RootTuber -6.356336e+00 2.536798e+01
## SheepGoat -3.843905e+01 4.720420e+01
## Soybean -2.804091e+00 1.544322e+01
## SugarCrop -1.972176e+01 -1.027108e+00
## Vegetables -7.608027e+01 -2.307504e+01
## Wheat -6.305571e+00 2.112014e+00
## NEC -1.350923e+01 1.265948e+00
## Pork -1.138891e+01 1.214072e+01
## calperg_food_w_calorie 1.003469e-05 7.074304e-05
## log(GDP_pcap_thous2015USD_FAO) -1.588377e-03 2.758135e-03
## year -8.469200e-07 5.748446e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.099886 -0.036590 0.009088 0.027670 0.144389
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 4.397e-06 6.989e-08 62.908 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 6.703e-03 2.878e-03 2.329 0.021194 *
## year -1.610e-05 4.362e-06 -3.692 0.000312 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04291 on 148 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9712, Adjusted R-squared: 0.9706
## F-statistic: 1665 on 3 and 148 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 4.258670e-06 4.534903e-06
## log(GDP_pcap_thous2015USD_FAO) 1.016450e-03 1.239027e-02
## year -2.472221e-05 -7.483397e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.077001 -0.012639 0.005579 0.020197 0.135233
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 2.471e-06 2.585e-07 9.558 < 2e-16 ***
## Feed_Kt 3.076e-06 4.019e-07 7.654 2.37e-12 ***
## log(GDP_pcap_thous2015USD_FAO) 4.924e-03 2.453e-03 2.007 0.046534 *
## year -1.254e-05 3.730e-06 -3.362 0.000987 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03641 on 147 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9794, Adjusted R-squared: 0.9789
## F-statistic: 1749 on 4 and 147 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.960011e-06 2.981728e-06
## Feed_Kt 2.281894e-06 3.870263e-06
## log(GDP_pcap_thous2015USD_FAO) 7.657649e-05 9.770945e-03
## year -1.991092e-05 -5.168472e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.072885 -0.014711 0.004362 0.018212 0.144544
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.404e+00 1.428e-01 9.829 < 2e-16 ***
## Feed_Kt 3.231e-06 3.759e-07 8.595 1.13e-14 ***
## log(GDP_pcap_thous2015USD_FAO) 4.794e-03 2.425e-03 1.977 0.0499 *
## year 2.843e-05 5.136e-06 5.535 1.39e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03601 on 147 degrees of freedom
## (289 observations deleted due to missingness)
## Multiple R-squared: 0.9799, Adjusted R-squared: 0.9793
## F-statistic: 1789 on 4 and 147 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.121701e+00 1.686291e+00
## Feed_Kt 2.487845e-06 3.973539e-06
## log(GDP_pcap_thous2015USD_FAO) 1.312156e-06 9.586561e-03
## year 1.827749e-05 3.857837e-05
## png
## 2
# get regions and years to remove
comb_data_sel_6 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_high_inonspec) %>%
anti_join(country_years_excl_low_foodpro)
calc_lin_model_food_en_use_production(comb_data_sel_6, "6")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64904 -0.03111 -0.02342 -0.00676 0.80861
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.031113 0.002478 12.56 <2e-16 ***
## PKcal 0.945705 0.013505 70.03 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1138 on 2354 degrees of freedom
## Multiple R-squared: 0.6757, Adjusted R-squared: 0.6755
## F-statistic: 4904 on 1 and 2354 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.69986 -0.00032 0.00675 0.02244 0.81688
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.00070 0.01319 75.85 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1175 on 2355 degrees of freedom
## Multiple R-squared: 0.7096, Adjusted R-squared: 0.7094
## F-statistic: 5754 on 1 and 2355 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65875 -0.03357 -0.02226 -0.00346 0.80363
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.989e-02 1.737e-02 5.75 1.01e-08 ***
## PKcal 9.464e-01 1.346e-02 70.30 < 2e-16 ***
## calperg_food_w_calorie -3.850e-05 9.626e-06 -4.00 6.54e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1134 on 2353 degrees of freedom
## Multiple R-squared: 0.6779, Adjusted R-squared: 0.6776
## F-statistic: 2476 on 2 and 2353 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65060 -0.03229 -0.01934 -0.00255 0.77559
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.718e-02 1.878e-02 3.578 0.000354 ***
## PKcal 9.499e-01 1.368e-02 69.441 < 2e-16 ***
## calperg_food_w_calorie -2.750e-05 1.011e-05 -2.720 0.006577 **
## GDP_pcap_thous2015USD_FAO 7.727e-04 1.353e-04 5.713 1.26e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1149 on 2258 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.6815, Adjusted R-squared: 0.6811
## F-statistic: 1610 on 3 and 2258 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64708 -0.03858 -0.01770 0.00450 0.76980
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.331e-02 2.030e-02 0.656 0.512
## PKcal 9.587e-01 1.361e-02 70.416 <2e-16 ***
## calperg_food_w_calorie -1.447e-05 1.021e-05 -1.418 0.156
## log(GDP_pcap_thous2015USD_FAO) 1.897e-02 2.172e-03 8.731 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1138 on 2258 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.6874, Adjusted R-squared: 0.687
## F-statistic: 1655 on 3 and 2258 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65114 -0.03239 -0.01900 -0.00288 0.78194
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.704e-02 1.883e-02 3.561 0.000377 ***
## PKcal 9.508e-01 1.359e-02 69.968 < 2e-16 ***
## calperg_food_w_calorie -2.749e-05 1.012e-05 -2.715 0.006672 **
## GDP_pcap_thous2015USD_calc 6.536e-04 1.169e-04 5.591 2.53e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1141 on 2291 degrees of freedom
## (61 observations deleted due to missingness)
## Multiple R-squared: 0.6815, Adjusted R-squared: 0.6811
## F-statistic: 1634 on 3 and 2291 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64320 -0.03843 -0.01705 0.00432 0.77009
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.014365 0.005552 -2.587 0.00974 **
## PKcal 0.958934 0.013616 70.426 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.019772 0.002097 9.427 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1138 on 2259 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.6871, Adjusted R-squared: 0.6869
## F-statistic: 2481 on 2 and 2259 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65291 -0.01767 -0.00700 0.00290 0.66893
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.321e-03 1.912e-03 3.829 0.000132 ***
## PKcal -5.321e-01 7.263e-02 -7.325 3.3e-13 ***
## PKcal:calperg_food_w_calorie 5.542e-04 3.759e-05 14.741 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.605e-01 1.012e-02 45.487 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08124 on 2258 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8406, Adjusted R-squared: 0.8404
## F-statistic: 3970 on 3 and 2258 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.66777 -0.02220 -0.00841 0.00814 0.66043
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.609e-02 1.498e-02 6.416 1.70e-10 ***
## PKcal -7.046e-01 7.630e-02 -9.235 < 2e-16 ***
## calperg_food_w_calorie -3.692e-05 7.587e-06 -4.867 1.21e-06 ***
## log(GDP_pcap_thous2015USD_FAO) -1.049e-02 1.657e-03 -6.332 2.92e-10 ***
## PKcal:calperg_food_w_calorie 6.326e-04 3.929e-05 16.103 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.879e-01 1.081e-02 45.158 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08037 on 2256 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8441, Adjusted R-squared: 0.8438
## F-statistic: 2444 on 5 and 2256 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 6.672373e-02 1.254607e-01
## PKcal -8.541779e-01 -5.549452e-01
## calperg_food_w_calorie -5.180118e-05 -2.204584e-05
## log(GDP_pcap_thous2015USD_FAO) -1.373963e-02 -7.241368e-03
## PKcal:calperg_food_w_calorie 5.555727e-04 7.096542e-04
## PKcal:log(GDP_pcap_thous2015USD_FAO) 4.667486e-01 5.091270e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64708 -0.03856 -0.01778 0.00441 0.76988
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.047e-02 3.892e-01 0.078 0.938
## PKcal 9.587e-01 1.364e-02 70.263 <2e-16 ***
## calperg_food_w_calorie -1.454e-05 1.031e-05 -1.409 0.159
## log(GDP_pcap_thous2015USD_FAO) 1.898e-02 2.187e-03 8.677 <2e-16 ***
## year -8.550e-06 1.938e-04 -0.044 0.965
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1138 on 2257 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.6874, Adjusted R-squared: 0.6869
## F-statistic: 1241 on 4 and 2257 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -0.7328117216 7.937434e-01
## PKcal 0.9319539345 9.854685e-01
## calperg_food_w_calorie -0.0000347599 5.688261e-06
## log(GDP_pcap_thous2015USD_FAO) 0.0146891814 2.326701e-02
## year -0.0003884983 3.713980e-04
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65519 -0.00485 -0.00004 0.00465 0.36046
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 1.656e-01 2.727e-01
## PKcal 1.858e+00 4.244e-02
## calperg_food_w_calorie -1.609e-05 1.241e-05
## log(GDP_pcap_thous2015USD_FAO) 6.785e-03 4.824e-03
## year -7.765e-05 1.347e-04
## country_nameAlgeria -4.996e-02 2.456e-02
## country_nameArgentina 2.727e-02 5.913e-02
## country_nameArmenia 5.255e-03 1.944e-02
## country_nameAustralia 6.261e-02 2.162e-02
## country_nameAustria -7.638e-03 2.253e-02
## country_nameAzerbaijan 3.636e-03 1.810e-02
## country_nameBelarus 9.539e-03 1.652e-02
## country_nameBelgium 1.006e-02 2.471e-02
## country_nameBenin 3.899e-03 2.317e-02
## country_nameBosnia and Herzegovina 7.962e-04 2.053e-02
## country_nameBotswana 5.423e-03 2.023e-02
## country_nameBrazil 2.117e-01 2.007e-02
## country_nameBulgaria 5.993e-03 1.917e-02
## country_nameCameroon -2.327e-02 2.480e-02
## country_nameCanada -3.666e-02 2.325e-02
## country_nameChile -8.131e-03 2.252e-02
## country_nameChina -1.455e+00 6.118e-02
## country_nameColombia -1.236e-02 1.747e-02
## country_nameCongo 8.086e-03 5.844e-02
## country_nameCosta Rica 1.232e-02 1.994e-02
## country_nameCote dIvoire -1.380e-02 2.607e-02
## country_nameCroatia 1.737e-03 1.872e-02
## country_nameCyprus -5.941e-03 2.073e-02
## country_nameCzech Republic 4.653e-03 2.140e-02
## country_nameDenmark 9.003e-03 2.218e-02
## country_nameDominican Republic 1.557e-02 1.789e-02
## country_nameEstonia 2.285e-03 1.752e-02
## country_nameFinland -3.971e-03 2.072e-02
## country_nameFrance -6.565e-03 2.186e-02
## country_nameGeorgia 7.418e-03 1.767e-02
## country_nameGermany 1.456e-02 2.090e-02
## country_nameGreece -1.768e-02 1.904e-02
## country_nameHungary 7.190e-03 1.909e-02
## country_nameIceland -6.890e-03 2.202e-02
## country_nameIreland 7.958e-04 2.145e-02
## country_nameIsrael -2.090e-02 2.480e-02
## country_nameItaly -7.251e-02 2.115e-02
## country_nameJamaica 2.288e-03 3.573e-02
## country_nameJapan -5.882e-02 2.136e-02
## country_nameKazakhstan 1.695e-02 1.905e-02
## country_nameKorea, Republic of -4.603e-02 1.997e-02
## country_nameKyrgyzstan 6.418e-03 1.950e-02
## country_nameLatvia 2.641e-03 1.730e-02
## country_nameLithuania 3.955e-03 1.714e-02
## country_nameLuxembourg -1.716e-02 2.643e-02
## country_nameMacedonia, the former Yugoslav Republic of 4.755e-03 1.766e-02
## country_nameMalta -5.196e-03 2.882e-02
## country_nameMexico -1.243e-01 2.093e-02
## country_nameMoldova, Republic of 1.076e-02 1.850e-02
## country_nameMontenegro 1.123e-03 2.288e-02
## country_nameMorocco -3.873e-02 2.181e-02
## country_nameMyanmar -6.671e-02 5.918e-02
## country_nameNetherlands 3.120e-02 2.101e-02
## country_nameNew Zealand 7.440e-03 2.207e-02
## country_nameNorway -6.407e-03 2.270e-02
## country_namePhilippines -6.853e-02 2.024e-02
## country_namePoland -5.508e-04 1.801e-02
## country_namePortugal -9.672e-03 1.864e-02
## country_nameRomania -1.745e-02 1.853e-02
## country_nameRussian Federation 1.672e-01 1.891e-02
## country_nameSenegal 8.785e-03 2.686e-02
## country_nameSerbia 7.363e-03 2.288e-02
## country_nameSlovakia 1.961e-03 2.115e-02
## country_nameSlovenia -1.612e-03 1.960e-02
## country_nameSouth Africa -2.447e-02 2.485e-02
## country_nameSpain -2.086e-02 1.927e-02
## country_nameSweden -1.090e-02 2.119e-02
## country_nameSwitzerland -1.880e-02 2.432e-02
## country_nameTajikistan 9.322e-03 1.789e-02
## country_nameThailand 6.547e-02 1.923e-02
## country_nameTogo 1.811e-02 2.444e-02
## country_nameTunisia -1.134e-02 2.245e-02
## country_nameTurkey -1.170e-01 1.779e-02
## country_nameTurkmenistan 2.344e-02 2.084e-02
## country_nameUkraine 1.429e-02 1.788e-02
## country_nameUnited Kingdom -3.113e-03 2.091e-02
## country_nameUnited States of America 1.306e-01 2.859e-02
## country_nameUruguay 3.831e-03 3.685e-02
## country_nameUzbekistan -6.821e-03 2.047e-02
## country_nameVenezuela -2.768e-02 2.187e-02
## country_nameViet Nam -6.452e-02 2.845e-02
## country_nameZambia 1.938e-02 2.448e-02
## country_nameZimbabwe 1.475e-02 3.102e-02
## t value Pr(>|t|)
## (Intercept) 0.607 0.543672
## PKcal 43.772 < 2e-16 ***
## calperg_food_w_calorie -1.296 0.195028
## log(GDP_pcap_thous2015USD_FAO) 1.407 0.159718
## year -0.576 0.564350
## country_nameAlgeria -2.034 0.042028 *
## country_nameArgentina 0.461 0.644782
## country_nameArmenia 0.270 0.786936
## country_nameAustralia 2.896 0.003819 **
## country_nameAustria -0.339 0.734670
## country_nameAzerbaijan 0.201 0.840799
## country_nameBelarus 0.577 0.563690
## country_nameBelgium 0.407 0.683928
## country_nameBenin 0.168 0.866373
## country_nameBosnia and Herzegovina 0.039 0.969070
## country_nameBotswana 0.268 0.788725
## country_nameBrazil 10.547 < 2e-16 ***
## country_nameBulgaria 0.313 0.754542
## country_nameCameroon -0.938 0.348146
## country_nameCanada -1.577 0.114983
## country_nameChile -0.361 0.718141
## country_nameChina -23.786 < 2e-16 ***
## country_nameColombia -0.708 0.479244
## country_nameCongo 0.138 0.889961
## country_nameCosta Rica 0.618 0.536773
## country_nameCote dIvoire -0.529 0.596684
## country_nameCroatia 0.093 0.926103
## country_nameCyprus -0.287 0.774476
## country_nameCzech Republic 0.217 0.827884
## country_nameDenmark 0.406 0.684873
## country_nameDominican Republic 0.870 0.384129
## country_nameEstonia 0.130 0.896238
## country_nameFinland -0.192 0.848015
## country_nameFrance -0.300 0.763996
## country_nameGeorgia 0.420 0.674628
## country_nameGermany 0.697 0.486160
## country_nameGreece -0.928 0.353348
## country_nameHungary 0.377 0.706421
## country_nameIceland -0.313 0.754368
## country_nameIreland 0.037 0.970406
## country_nameIsrael -0.843 0.399419
## country_nameItaly -3.428 0.000620 ***
## country_nameJamaica 0.064 0.948941
## country_nameJapan -2.754 0.005935 **
## country_nameKazakhstan 0.890 0.373803
## country_nameKorea, Republic of -2.305 0.021258 *
## country_nameKyrgyzstan 0.329 0.742137
## country_nameLatvia 0.153 0.878652
## country_nameLithuania 0.231 0.817509
## country_nameLuxembourg -0.649 0.516330
## country_nameMacedonia, the former Yugoslav Republic of 0.269 0.787750
## country_nameMalta -0.180 0.856949
## country_nameMexico -5.941 3.30e-09 ***
## country_nameMoldova, Republic of 0.582 0.560882
## country_nameMontenegro 0.049 0.960859
## country_nameMorocco -1.776 0.075880 .
## country_nameMyanmar -1.127 0.259752
## country_nameNetherlands 1.485 0.137716
## country_nameNew Zealand 0.337 0.736077
## country_nameNorway -0.282 0.777806
## country_namePhilippines -3.386 0.000721 ***
## country_namePoland -0.031 0.975609
## country_namePortugal -0.519 0.603852
## country_nameRomania -0.942 0.346192
## country_nameRussian Federation 8.844 < 2e-16 ***
## country_nameSenegal 0.327 0.743618
## country_nameSerbia 0.322 0.747647
## country_nameSlovakia 0.093 0.926132
## country_nameSlovenia -0.082 0.934439
## country_nameSouth Africa -0.985 0.324928
## country_nameSpain -1.082 0.279302
## country_nameSweden -0.514 0.606973
## country_nameSwitzerland -0.773 0.439544
## country_nameTajikistan 0.521 0.602277
## country_nameThailand 3.404 0.000676 ***
## country_nameTogo 0.741 0.458862
## country_nameTunisia -0.505 0.613650
## country_nameTurkey -6.576 6.03e-11 ***
## country_nameTurkmenistan 1.125 0.260842
## country_nameUkraine 0.799 0.424269
## country_nameUnited Kingdom -0.149 0.881672
## country_nameUnited States of America 4.566 5.24e-06 ***
## country_nameUruguay 0.104 0.917222
## country_nameUzbekistan -0.333 0.738977
## country_nameVenezuela -1.266 0.205702
## country_nameViet Nam -2.268 0.023445 *
## country_nameZambia 0.792 0.428621
## country_nameZimbabwe 0.475 0.634483
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05656 on 2174 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.9256, Adjusted R-squared: 0.9226
## F-statistic: 311 on 87 and 2174 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -3.691750e-01
## PKcal 1.774568e+00
## calperg_food_w_calorie -4.043352e-05
## log(GDP_pcap_thous2015USD_FAO) -2.675218e-03
## year -3.417892e-04
## country_nameAlgeria -9.812224e-02
## country_nameArgentina -8.869935e-02
## country_nameArmenia -3.286451e-02
## country_nameAustralia 2.021012e-02
## country_nameAustria -5.182518e-02
## country_nameAzerbaijan -3.185316e-02
## country_nameBelarus -2.285513e-02
## country_nameBelgium -3.839592e-02
## country_nameBenin -4.153187e-02
## country_nameBosnia and Herzegovina -3.946582e-02
## country_nameBotswana -3.425751e-02
## country_nameBrazil 1.723288e-01
## country_nameBulgaria -3.159091e-02
## country_nameCameroon -7.189503e-02
## country_nameCanada -8.225354e-02
## country_nameChile -5.230117e-02
## country_nameChina -1.575265e+00
## country_nameColombia -4.663148e-02
## country_nameCongo -1.065197e-01
## country_nameCosta Rica -2.678757e-02
## country_nameCote dIvoire -6.493437e-02
## country_nameCroatia -3.498216e-02
## country_nameCyprus -4.659499e-02
## country_nameCzech Republic -3.731362e-02
## country_nameDenmark -3.449689e-02
## country_nameDominican Republic -1.950841e-02
## country_nameEstonia -3.207743e-02
## country_nameFinland -4.459660e-02
## country_nameFrance -4.944121e-02
## country_nameGeorgia -2.722844e-02
## country_nameGermany -2.643027e-02
## country_nameGreece -5.501921e-02
## country_nameHungary -3.023774e-02
## country_nameIceland -5.007227e-02
## country_nameIreland -4.126385e-02
## country_nameIsrael -6.953430e-02
## country_nameItaly -1.139923e-01
## country_nameJamaica -6.778043e-02
## country_nameJapan -1.007006e-01
## country_nameKazakhstan -2.041566e-02
## country_nameKorea, Republic of -8.518954e-02
## country_nameKyrgyzstan -3.183002e-02
## country_nameLatvia -3.127890e-02
## country_nameLithuania -2.965295e-02
## country_nameLuxembourg -6.899129e-02
## country_nameMacedonia, the former Yugoslav Republic of -2.987735e-02
## country_nameMalta -6.171466e-02
## country_nameMexico -1.653939e-01
## country_nameMoldova, Republic of -2.551934e-02
## country_nameMontenegro -4.374405e-02
## country_nameMorocco -8.149224e-02
## country_nameMyanmar -1.827648e-01
## country_nameNetherlands -1.000495e-02
## country_nameNew Zealand -3.583984e-02
## country_nameNorway -5.092772e-02
## country_namePhilippines -1.082260e-01
## country_namePoland -3.587237e-02
## country_namePortugal -4.622257e-02
## country_nameRomania -5.378394e-02
## country_nameRussian Federation 1.301393e-01
## country_nameSenegal -4.388252e-02
## country_nameSerbia -3.750772e-02
## country_nameSlovakia -3.951945e-02
## country_nameSlovenia -4.004905e-02
## country_nameSouth Africa -7.320902e-02
## country_nameSpain -5.865676e-02
## country_nameSweden -5.246760e-02
## country_nameSwitzerland -6.648475e-02
## country_nameTajikistan -2.575273e-02
## country_nameThailand 2.775478e-02
## country_nameTogo -2.981975e-02
## country_nameTunisia -5.536484e-02
## country_nameTurkey -1.519086e-01
## country_nameTurkmenistan -1.742767e-02
## country_nameUkraine -2.077337e-02
## country_nameUnited Kingdom -4.411826e-02
## country_nameUnited States of America 7.448731e-02
## country_nameUruguay -6.844064e-02
## country_nameUzbekistan -4.696239e-02
## country_nameVenezuela -7.057390e-02
## country_nameViet Nam -1.203239e-01
## country_nameZambia -2.863148e-02
## country_nameZimbabwe -4.607746e-02
## 97.5 %
## (Intercept) 7.004526e-01
## PKcal 1.941031e+00
## calperg_food_w_calorie 8.252391e-06
## log(GDP_pcap_thous2015USD_FAO) 1.624542e-02
## year 1.864929e-04
## country_nameAlgeria -1.802372e-03
## country_nameArgentina 1.432313e-01
## country_nameArmenia 4.337368e-02
## country_nameAustralia 1.050029e-01
## country_nameAustria 3.654981e-02
## country_nameAzerbaijan 3.912430e-02
## country_nameBelarus 4.193275e-02
## country_nameBelgium 5.851751e-02
## country_nameBenin 4.932904e-02
## country_nameBosnia and Herzegovina 4.105814e-02
## country_nameBotswana 4.510298e-02
## country_nameBrazil 2.510465e-01
## country_nameBulgaria 4.357656e-02
## country_nameCameroon 2.535801e-02
## country_nameCanada 8.933314e-03
## country_nameChile 3.603943e-02
## country_nameChina -1.335305e+00
## country_nameColombia 2.190153e-02
## country_nameCongo 1.226927e-01
## country_nameCosta Rica 5.142814e-02
## country_nameCote dIvoire 3.733402e-02
## country_nameCroatia 3.845583e-02
## country_nameCyprus 3.471368e-02
## country_nameCzech Republic 4.662021e-02
## country_nameDenmark 5.250317e-02
## country_nameDominican Republic 5.065159e-02
## country_nameEstonia 3.664841e-02
## country_nameFinland 3.665504e-02
## country_nameFrance 3.631089e-02
## country_nameGeorgia 4.206394e-02
## country_nameGermany 5.554826e-02
## country_nameGreece 1.966544e-02
## country_nameHungary 4.461731e-02
## country_nameIceland 3.629129e-02
## country_nameIreland 4.285540e-02
## country_nameIsrael 2.773134e-02
## country_nameItaly -3.102676e-02
## country_nameJamaica 7.235701e-02
## country_nameJapan -1.693648e-02
## country_nameKazakhstan 5.431369e-02
## country_nameKorea, Republic of -6.868925e-03
## country_nameKyrgyzstan 4.466612e-02
## country_nameLatvia 3.656122e-02
## country_nameLithuania 3.756295e-02
## country_nameLuxembourg 3.467669e-02
## country_nameMacedonia, the former Yugoslav Republic of 3.938795e-02
## country_nameMalta 5.132306e-02
## country_nameMexico -8.329845e-02
## country_nameMoldova, Republic of 4.703913e-02
## country_nameMontenegro 4.598988e-02
## country_nameMorocco 4.036365e-03
## country_nameMyanmar 4.934270e-02
## country_nameNetherlands 7.240589e-02
## country_nameNew Zealand 5.071886e-02
## country_nameNorway 3.811382e-02
## country_namePhilippines -2.884395e-02
## country_namePoland 3.477088e-02
## country_namePortugal 2.687825e-02
## country_nameRomania 1.887456e-02
## country_nameRussian Federation 2.042928e-01
## country_nameSenegal 6.145260e-02
## country_nameSerbia 5.223302e-02
## country_nameSlovakia 4.344205e-02
## country_nameSlovenia 3.682406e-02
## country_nameSouth Africa 2.426795e-02
## country_nameSpain 1.694039e-02
## country_nameSweden 3.065959e-02
## country_nameSwitzerland 2.888657e-02
## country_nameTajikistan 4.439695e-02
## country_nameThailand 1.031845e-01
## country_nameTogo 6.603034e-02
## country_nameTunisia 3.269159e-02
## country_nameTurkey -8.212008e-02
## country_nameTurkmenistan 6.429936e-02
## country_nameUkraine 4.935115e-02
## country_nameUnited Kingdom 3.789265e-02
## country_nameUnited States of America 1.866283e-01
## country_nameUruguay 7.610214e-02
## country_nameUzbekistan 3.331969e-02
## country_nameVenezuela 1.520447e-02
## country_nameViet Nam -8.725445e-03
## country_nameZambia 6.740090e-02
## country_nameZimbabwe 7.557405e-02
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65704 -0.01752 -0.00409 0.00682 0.47696
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.538e+00 2.477e-01 6.208 6.35e-10 ***
## staples -3.909e-01 2.482e-02 -15.747 < 2e-16 ***
## nonstaples_animal -1.152e-02 1.848e-01 -0.062 0.950
## nonstaples_other 5.993e+00 1.698e-01 35.304 < 2e-16 ***
## calperg_food_w_calorie -8.771e-06 6.435e-06 -1.363 0.173
## log(GDP_pcap_thous2015USD_FAO) -7.514e-04 1.454e-03 -0.517 0.605
## year -7.586e-04 1.233e-04 -6.152 9.02e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07073 on 2255 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8794, Adjusted R-squared: 0.879
## F-statistic: 2740 on 6 and 2255 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 1.052088e+00 2.023574e+00
## staples -4.395600e-01 -3.422044e-01
## nonstaples_animal -3.739226e-01 3.508751e-01
## nonstaples_other 5.660087e+00 6.325863e+00
## calperg_food_w_calorie -2.138929e-05 3.848094e-06
## log(GDP_pcap_thous2015USD_FAO) -3.602486e-03 2.099773e-03
## year -1.000443e-03 -5.168066e-04
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.65711 -0.01754 -0.00384 0.00665 0.47832
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.563e+00 2.507e-01 6.234 5.40e-10 ***
## staples -3.858e-01 2.407e-02 -16.029 < 2e-16 ***
## nonstaples_animal -4.328e-02 1.823e-01 -0.237 0.812
## nonstaples_other 6.009e+00 1.694e-01 35.481 < 2e-16 ***
## calperg_food_w_calorie -7.948e-06 6.346e-06 -1.252 0.211
## GDP_pcap_thous2015USD_FAO 2.107e-05 8.751e-05 0.241 0.810
## year -7.731e-04 1.248e-04 -6.196 6.88e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07073 on 2255 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8794, Adjusted R-squared: 0.879
## F-statistic: 2739 on 6 and 2255 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 1.071522e+00 2.054968e+00
## staples -4.329508e-01 -3.385632e-01
## nonstaples_animal -4.007760e-01 3.142203e-01
## nonstaples_other 5.676817e+00 6.341047e+00
## calperg_food_w_calorie -2.039211e-05 4.496130e-06
## GDP_pcap_thous2015USD_FAO -1.505385e-04 1.926743e-04
## year -1.017832e-03 -5.284231e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64999 -0.01683 -0.00565 0.00620 0.47897
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -3.868e-01 2.502e-02 -15.460 <2e-16 ***
## nonstaples_animal 2.119e-01 1.828e-01 1.160 0.246
## nonstaples_other 5.764e+00 1.671e-01 34.501 <2e-16 ***
## calperg_food_w_calorie -7.954e-07 6.357e-06 -0.125 0.900
## log(GDP_pcap_thous2015USD_FAO) -1.738e-03 1.457e-03 -1.193 0.233
## year 5.962e-06 6.334e-06 0.941 0.347
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07131 on 2256 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8974, Adjusted R-squared: 0.8971
## F-statistic: 3289 on 6 and 2256 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -4.358672e-01 -3.377393e-01
## nonstaples_animal -1.464665e-01 5.703421e-01
## nonstaples_other 5.436173e+00 6.091400e+00
## calperg_food_w_calorie -1.326252e-05 1.167179e-05
## log(GDP_pcap_thous2015USD_FAO) -4.596005e-03 1.119022e-03
## year -6.458931e-06 1.838277e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64708 -0.03861 -0.01766 0.00449 0.76974
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 9.586e-01 1.362e-02 70.395 <2e-16 ***
## calperg_food_w_calorie -1.438e-05 1.012e-05 -1.421 0.156
## log(GDP_pcap_thous2015USD_FAO) 1.896e-02 2.178e-03 8.706 <2e-16 ***
## year 6.595e-06 1.010e-05 0.653 0.514
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1138 on 2258 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.7386, Adjusted R-squared: 0.7382
## F-statistic: 1595 on 4 and 2258 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.319433e-01 9.853538e-01
## calperg_food_w_calorie -3.423443e-05 5.469304e-06
## log(GDP_pcap_thous2015USD_FAO) 1.469177e-02 2.323419e-02
## year -1.321931e-05 2.640857e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64792 -0.03895 -0.01883 0.00716 0.76990
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 9.693e-01 1.381e-02 70.186 < 2e-16 ***
## staples_frac -1.195e-01 2.879e-02 -4.152 3.42e-05 ***
## calperg_food_w_calorie -4.131e-06 1.038e-05 -0.398 0.69086
## log(GDP_pcap_thous2015USD_FAO) 7.729e-03 3.469e-03 2.228 0.02597 *
## year 3.530e-05 1.221e-05 2.890 0.00388 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1134 on 2257 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.7406, Adjusted R-squared: 0.74
## F-statistic: 1289 on 5 and 2257 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.422365e-01 9.964023e-01
## staples_frac -1.759708e-01 -6.306537e-02
## calperg_food_w_calorie -2.449552e-05 1.623442e-05
## log(GDP_pcap_thous2015USD_FAO) 9.264985e-04 1.453095e-02
## year 1.135053e-05 5.925218e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64791 -0.03880 -0.01875 0.00677 0.77046
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 9.694e-01 1.382e-02 70.153 < 2e-16 ***
## nonstaples_frac 1.178e-01 2.856e-02 4.124 3.85e-05 ***
## calperg_food_w_calorie -4.871e-06 1.035e-05 -0.471 0.6379
## log(GDP_pcap_thous2015USD_FAO) 7.949e-03 3.441e-03 2.310 0.0210 *
## year -2.367e-05 1.246e-05 -1.900 0.0576 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1134 on 2257 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.7406, Adjusted R-squared: 0.74
## F-statistic: 1289 on 5 and 2257 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.423092e-01 9.965059e-01
## nonstaples_frac 6.178444e-02 1.737983e-01
## calperg_food_w_calorie -2.516344e-05 1.542100e-05
## log(GDP_pcap_thous2015USD_FAO) 1.201369e-03 1.469762e-02
## year -4.809948e-05 7.627974e-07
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.64328 -0.02021 -0.00690 0.00453 0.55692
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 3.117e+00 4.125e-02 75.549 < 2e-16 ***
## staples_frac -2.075e-02 1.923e-02 -1.079 0.280631
## calperg_food_w_calorie 4.919e-06 6.906e-06 0.712 0.476366
## log(GDP_pcap_thous2015USD_FAO) -7.856e-03 2.324e-03 -3.380 0.000738 ***
## year 1.247e-05 8.131e-06 1.533 0.125410
## PKcal:staples_frac -3.489e+00 6.535e-02 -53.392 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07537 on 2256 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8854, Adjusted R-squared: 0.8851
## F-statistic: 2905 on 6 and 2256 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 3.035742e+00 3.197538e+00
## staples_frac -5.845473e-02 1.695577e-02
## calperg_food_w_calorie -8.623863e-06 1.846195e-05
## log(GDP_pcap_thous2015USD_FAO) -1.241447e-02 -3.297933e-03
## year -3.479947e-06 2.840969e-05
## PKcal:staples_frac -3.617075e+00 -3.360786e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141836 -0.007919 0.000211 0.009788 0.133846
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef -2.782e+00 4.446e+00 -0.626 0.531839
## Corn -6.465e+00 8.240e-01 -7.845 3.80e-14 ***
## Dairy 3.474e+00 2.505e+00 1.387 0.166170
## FiberCrop 8.983e+01 1.256e+01 7.151 4.00e-12 ***
## Fruits -1.161e+01 2.983e+00 -3.894 0.000115 ***
## Legumes -7.948e-01 5.322e+00 -0.149 0.881361
## MiscCrop 1.348e+01 1.180e+01 1.143 0.253796
## NutsSeeds 7.714e+00 5.038e+00 1.531 0.126506
## OilCrop -2.475e+00 1.454e+00 -1.703 0.089328 .
## OilPalm -1.712e+01 3.665e+00 -4.671 4.08e-06 ***
## OtherGrain -1.356e+01 2.236e+00 -6.062 3.06e-09 ***
## OtherMeat_Fish -1.062e+01 4.260e+00 -2.493 0.013078 *
## Poultry 2.040e+01 3.779e+00 5.398 1.14e-07 ***
## Rice 1.404e+00 6.165e-01 2.278 0.023256 *
## RootTuber 5.793e+00 1.648e+00 3.516 0.000488 ***
## SheepGoat -1.759e+01 1.598e+01 -1.101 0.271488
## Soybean 9.125e+00 1.471e+00 6.204 1.35e-09 ***
## SugarCrop 1.968e+01 1.936e+00 10.166 < 2e-16 ***
## Vegetables -2.574e+00 4.410e+00 -0.584 0.559796
## Wheat -1.591e+00 5.735e-01 -2.775 0.005777 **
## NEC -3.715e+00 1.656e+00 -2.243 0.025421 *
## Pork 2.271e+00 1.793e+00 1.267 0.205905
## calperg_food_w_calorie -3.105e-06 7.075e-06 -0.439 0.660986
## log(GDP_pcap_thous2015USD_FAO) 4.356e-03 1.461e-03 2.981 0.003042 **
## year -1.492e-06 6.313e-06 -0.236 0.813310
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02784 on 409 degrees of freedom
## (1922 observations deleted due to missingness)
## Multiple R-squared: 0.991, Adjusted R-squared: 0.9904
## F-statistic: 1801 on 25 and 409 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -1.152076e+01 5.957284e+00
## Corn -8.084259e+00 -4.844743e+00
## Dairy -1.449431e+00 8.397836e+00
## FiberCrop 6.513526e+01 1.145240e+02
## Fruits -1.747898e+01 -5.750753e+00
## Legumes -1.125734e+01 9.667696e+00
## MiscCrop -9.708529e+00 3.667045e+01
## NutsSeeds -2.189670e+00 1.761733e+01
## OilCrop -5.332776e+00 3.819695e-01
## OilPalm -2.432096e+01 -9.913085e+00
## OtherGrain -1.795152e+01 -9.159526e+00
## OtherMeat_Fish -1.899181e+01 -2.243923e+00
## Poultry 1.296964e+01 2.782557e+01
## Rice 1.923301e-01 2.616075e+00
## RootTuber 2.553679e+00 9.031771e+00
## SheepGoat -4.899704e+01 1.381372e+01
## Soybean 6.233496e+00 1.201552e+01
## SugarCrop 1.587721e+01 2.348991e+01
## Vegetables -1.124277e+01 6.095264e+00
## Wheat -2.718548e+00 -4.639251e-01
## NEC -6.970192e+00 -4.593611e-01
## Pork -1.252852e+00 5.795284e+00
## calperg_food_w_calorie -1.701360e-05 1.080331e-05
## log(GDP_pcap_thous2015USD_FAO) 1.483569e-03 7.227489e-03
## year -1.390222e-05 1.091848e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.72057 -0.03974 -0.02127 0.00009 0.78726
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.569e-06 2.178e-08 72.058 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.637e-02 2.063e-03 7.936 3.25e-15 ***
## year -1.244e-06 2.722e-06 -0.457 0.648
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.112 on 2259 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.7466, Adjusted R-squared: 0.7463
## F-statistic: 2219 on 3 and 2259 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.526582e-06 1.611996e-06
## log(GDP_pcap_thous2015USD_FAO) 1.232651e-02 2.041742e-02
## year -6.582453e-06 4.094002e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73497 -0.01599 -0.00694 0.00375 0.66168
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 4.776e-08 3.470e-08 1.376 0.16884
## Feed_Kt 4.983e-06 1.022e-07 48.773 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 4.414e-03 1.461e-03 3.022 0.00254 **
## year -1.531e-06 1.900e-06 -0.806 0.42052
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07817 on 2258 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8766, Adjusted R-squared: 0.8764
## F-statistic: 4011 on 4 and 2258 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -2.028843e-08 1.158164e-07
## Feed_Kt 4.783132e-06 5.183878e-06
## log(GDP_pcap_thous2015USD_FAO) 1.549742e-03 7.278405e-03
## year -5.256870e-06 2.195239e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.76773 -0.01410 -0.00644 0.00366 0.66054
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -4.900e-02 2.209e-02 -2.218 0.0267 *
## Feed_Kt 5.322e-06 1.057e-07 50.358 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 3.213e-03 1.480e-03 2.171 0.0300 *
## year -5.696e-07 1.918e-06 -0.297 0.7665
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07812 on 2258 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.8768, Adjusted R-squared: 0.8766
## F-statistic: 4017 on 4 and 2258 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -9.232019e-02 -5.676755e-03
## Feed_Kt 5.115063e-06 5.529578e-06
## log(GDP_pcap_thous2015USD_FAO) 3.111356e-04 6.113960e-03
## year -4.330310e-06 3.191092e-06
## png
## 2
plot_ly(comb_data_sel_6) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_6) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_6 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
TRUE ~ ">= 30"))) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
text = ~country_name,
color = ~GDP_group) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_6 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
TRUE ~ ">= 30"))) %>%
add_trace(x = ~GDP_group,
y = ~EJ_per_PKcal,
type = "box") %>%
layout(xaxis = list(title = "GDP category"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_6) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP")
plot_ly(comb_data_sel_6 %>% filter(year == 2015)) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP, 2015")
print(summary(lm(EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO, comb_data_sel_6)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO, data = comb_data_sel_6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.9307 -0.9013 -0.2945 0.6509 9.5030
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.48967 0.03964 37.58 <2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.02173 0.00156 13.92 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.349 on 2260 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.07901, Adjusted R-squared: 0.0786
## F-statistic: 193.9 on 1 and 2260 DF, p-value: < 2.2e-16
print(summary(lm(EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO + staples_frac, comb_data_sel_6)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO + staples_frac,
## data = comb_data_sel_6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2036 -0.8176 -0.2543 0.5140 9.2111
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.483828 0.129097 26.99 <2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.002031 0.001916 1.06 0.289
## staples_frac -3.909991 0.242182 -16.14 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.278 on 2259 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.1743, Adjusted R-squared: 0.1736
## F-statistic: 238.4 on 2 and 2259 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ log(staples_frac), comb_data_sel_6))
##
## Call:
## lm(formula = EJ_per_PKcal ~ log(staples_frac), data = comb_data_sel_6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3562 -0.8052 -0.2483 0.5007 9.0550
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.28267 0.07573 3.733 0.000194 ***
## log(staples_frac) -1.69809 0.07665 -22.154 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.265 on 2354 degrees of freedom
## Multiple R-squared: 0.1725, Adjusted R-squared: 0.1722
## F-statistic: 490.8 on 1 and 2354 DF, p-value: < 2.2e-16
lm_to_plot <- lm(EJ_per_PKcal ~ nonstaples_frac, comb_data_sel_6)
lm_to_plot_summary <- summary(lm_to_plot)
print(lm_to_plot_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ nonstaples_frac, data = comb_data_sel_6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2614 -0.8018 -0.2628 0.4855 9.2720
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.4591 0.1097 -4.184 2.97e-05 ***
## nonstaples_frac 3.9868 0.1834 21.742 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.269 on 2354 degrees of freedom
## Multiple R-squared: 0.1672, Adjusted R-squared: 0.1669
## F-statistic: 472.7 on 1 and 2354 DF, p-value: < 2.2e-16
lm_to_plot2 <- lm(EJ_per_PKcal ~ exp(nonstaples_frac), comb_data_sel_6)
lm_to_plot2_summary <- summary(lm_to_plot)
print(lm_to_plot2_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ nonstaples_frac, data = comb_data_sel_6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2614 -0.8018 -0.2628 0.4855 9.2720
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.4591 0.1097 -4.184 2.97e-05 ***
## nonstaples_frac 3.9868 0.1834 21.742 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.269 on 2354 degrees of freedom
## Multiple R-squared: 0.1672, Adjusted R-squared: 0.1669
## F-statistic: 472.7 on 1 and 2354 DF, p-value: < 2.2e-16
print(summary(lm(EJ_per_PKcal ~ exp(nonstaples_frac) + GDP_pcap_thous2015USD_FAO, comb_data_sel_6)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ exp(nonstaples_frac) + GDP_pcap_thous2015USD_FAO,
## data = comb_data_sel_6)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2547 -0.8155 -0.2510 0.5063 9.1387
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -2.3453945 0.2365185 -9.916 <2e-16 ***
## exp(nonstaples_frac) 2.3325542 0.1420372 16.422 <2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.0008503 0.0019474 0.437 0.662
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.276 on 2259 degrees of freedom
## (94 observations deleted due to missingness)
## Multiple R-squared: 0.1772, Adjusted R-squared: 0.1765
## F-statistic: 243.3 on 2 and 2259 DF, p-value: < 2.2e-16
# get key values from the model to plot
pval <- lm_to_plot_summary$coef[2,4]
Rsq <- lm_to_plot_summary$adj.r.squared
slope <- lm_to_plot_summary$coef[[2]]
# plot
x_for_lin_reg_plot <- c(0,1)
plot_ly(comb_data_sel_6) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
# get key values from the model to plot
pval <- lm_to_plot2_summary$coef[2,4]
Rsq <- lm_to_plot2_summary$adj.r.squared
slope <- lm_to_plot2_summary$coef[[2]]
# plot
x_for_lin_reg_plot <- c(0,1)
plot_ly(comb_data_sel_6) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot2, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
# get regions and years to remove
country_years_excl_high_inonspec_fuel <- IEA_ind_sectors_region_fuel %>%
filter(FLOW == "INONSPEC") %>%
filter(frac_sector > max_frac_INONSPEC_fuel) %>%
dplyr::select(iso, country_name, GCAM_region_ID, year) %>%
distinct()
comb_data_sel_7 <- comb_data_sel_cats %>%
filter(year >= 2010 & year <= 2015,
!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_high_inonspec_fuel) %>%
anti_join(country_years_excl_low_foodpro)
calc_lin_model_food_en_use_production(comb_data_sel_7, "7")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.45111 -0.03305 -0.02843 -0.01620 0.68899
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.031848 0.007273 4.379 1.58e-05 ***
## PKcal 1.231925 0.032148 38.320 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1297 on 344 degrees of freedom
## Multiple R-squared: 0.8102, Adjusted R-squared: 0.8096
## F-statistic: 1468 on 1 and 344 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48658 -0.00171 0.00317 0.01409 0.70819
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.27191 0.03163 40.22 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1331 on 345 degrees of freedom
## Multiple R-squared: 0.8242, Adjusted R-squared: 0.8237
## F-statistic: 1618 on 1 and 345 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44532 -0.03451 -0.02275 -0.01069 0.68473
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -6.766e-02 5.777e-02 -1.171 0.2424
## PKcal 1.241e+00 3.246e-02 38.230 <2e-16 ***
## calperg_food_w_calorie 6.014e-05 3.464e-05 1.736 0.0834 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1293 on 343 degrees of freedom
## Multiple R-squared: 0.8119, Adjusted R-squared: 0.8108
## F-statistic: 740 on 2 and 343 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44119 -0.03660 -0.02075 -0.00150 0.69100
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.051e-02 5.866e-02 -1.543 0.1238
## PKcal 1.245e+00 3.251e-02 38.294 <2e-16 ***
## calperg_food_w_calorie 6.426e-05 3.507e-05 1.832 0.0678 .
## GDP_pcap_thous2015USD_FAO 7.586e-04 3.155e-04 2.404 0.0167 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1294 on 336 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8153, Adjusted R-squared: 0.8137
## F-statistic: 494.4 on 3 and 336 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44119 -0.04260 -0.02491 0.00282 0.68819
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.114e-01 5.967e-02 -1.868 0.06268 .
## PKcal 1.243e+00 3.240e-02 38.367 < 2e-16 ***
## calperg_food_w_calorie 5.958e-05 3.506e-05 1.699 0.09016 .
## log(GDP_pcap_thous2015USD_FAO) 1.765e-02 6.501e-03 2.714 0.00698 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1291 on 336 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8162, Adjusted R-squared: 0.8145
## F-statistic: 497.3 on 3 and 336 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44137 -0.03565 -0.02227 -0.00191 0.68876
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.828e-02 5.961e-02 -1.481 0.1396
## PKcal 1.245e+00 3.293e-02 37.825 <2e-16 ***
## calperg_food_w_calorie 6.359e-05 3.554e-05 1.789 0.0745 .
## GDP_pcap_thous2015USD_calc 6.200e-04 2.825e-04 2.195 0.0289 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1307 on 330 degrees of freedom
## (12 observations deleted due to missingness)
## Multiple R-squared: 0.8145, Adjusted R-squared: 0.8128
## F-statistic: 483 on 3 and 330 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44686 -0.04153 -0.02368 -0.00791 0.69149
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.014932 0.018365 -0.813 0.41676
## PKcal 1.234712 0.032110 38.453 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.018346 0.006506 2.820 0.00509 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1294 on 337 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8146, Adjusted R-squared: 0.8135
## F-statistic: 740.3 on 2 and 337 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36093 -0.00289 0.00825 0.01311 0.47044
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.010634 0.005118 -2.078 0.03851 *
## PKcal -3.810629 0.290783 -13.105 < 2e-16 ***
## PKcal:calperg_food_w_calorie 0.003482 0.000266 13.089 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.147681 0.053993 2.735 0.00657 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08211 on 336 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9256, Adjusted R-squared: 0.9249
## F-statistic: 1393 on 3 and 336 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36427 -0.02019 0.00238 0.02126 0.44445
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.679e-01 3.905e-02 4.300 2.25e-05 ***
## PKcal -4.436e+00 3.112e-01 -14.254 < 2e-16 ***
## calperg_food_w_calorie -1.142e-04 2.372e-05 -4.814 2.25e-06 ***
## log(GDP_pcap_thous2015USD_FAO) 2.123e-03 4.369e-03 0.486 0.627
## PKcal:calperg_food_w_calorie 4.032e-03 2.859e-04 14.102 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 7.925e-02 5.796e-02 1.367 0.172
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07964 on 334 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9304, Adjusted R-squared: 0.9294
## F-statistic: 893.2 on 5 and 334 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 0.0910973227 2.447292e-01
## PKcal -5.0484029947 -3.823990e+00
## calperg_food_w_calorie -0.0001608128 -6.751291e-05
## log(GDP_pcap_thous2015USD_FAO) -0.0064721617 1.071792e-02
## PKcal:calperg_food_w_calorie 0.0034693636 4.594188e-03
## PKcal:log(GDP_pcap_thous2015USD_FAO) -0.0347671660 1.932679e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43707 -0.04210 -0.02494 0.00158 0.68726
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.297e+00 8.233e+00 0.400 0.68908
## PKcal 1.243e+00 3.244e-02 38.321 < 2e-16 ***
## calperg_food_w_calorie 5.956e-05 3.510e-05 1.697 0.09068 .
## log(GDP_pcap_thous2015USD_FAO) 1.768e-02 6.509e-03 2.716 0.00695 **
## year -1.693e-03 4.091e-03 -0.414 0.67914
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1292 on 335 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8163, Adjusted R-squared: 0.8141
## F-statistic: 372.1 on 4 and 335 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -1.289752e+01 1.949098e+01
## PKcal 1.179340e+00 1.306967e+00
## calperg_food_w_calorie -9.489987e-06 1.286073e-04
## log(GDP_pcap_thous2015USD_FAO) 4.874639e-03 3.048353e-02
## year -9.740025e-03 6.353056e-03
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.054146 -0.002125 0.000014 0.002112 0.077244
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 4.078e-01 9.922e-01
## PKcal -1.510e+00 1.268e-01
## calperg_food_w_calorie -4.393e-05 2.001e-05
## log(GDP_pcap_thous2015USD_FAO) 4.914e-02 2.028e-02
## year -2.059e-04 5.014e-04
## country_nameArmenia 3.231e-03 1.063e-02
## country_nameAustralia 7.539e-02 5.567e-02
## country_nameAustria -5.532e-02 5.579e-02
## country_nameAzerbaijan 2.003e-02 1.392e-02
## country_nameBelarus 2.576e-02 1.348e-02
## country_nameBelgium -1.492e-02 5.371e-02
## country_nameBenin 1.006e-01 3.243e-02
## country_nameBosnia and Herzegovina 1.808e-03 9.682e-03
## country_nameBotswana -4.332e-03 1.985e-02
## country_nameBrazil 1.290e+00 3.286e-02
## country_nameBulgaria 1.564e-02 2.173e-02
## country_nameCanada 2.603e-02 5.342e-02
## country_nameChina 4.170e+00 2.006e-01
## country_nameColombia 1.349e-01 1.569e-02
## country_nameCongo 4.880e-02 1.870e-02
## country_nameCosta Rica -9.609e-04 3.037e-02
## country_nameCroatia -2.658e-02 2.793e-02
## country_nameCyprus -7.136e-02 4.300e-02
## country_nameCzech Republic -1.346e-02 3.604e-02
## country_nameDenmark -7.868e-02 5.743e-02
## country_nameDominican Republic 2.171e-02 1.606e-02
## country_nameEstonia -5.970e-02 3.324e-02
## country_nameFinland -8.518e-02 5.269e-02
## country_nameGeorgia 3.325e-02 1.382e-02
## country_nameGermany 2.666e-01 4.988e-02
## country_nameGreece -2.748e-02 3.648e-02
## country_nameHungary 5.946e-03 3.177e-02
## country_nameIceland -1.147e-01 5.592e-02
## country_nameIreland -8.777e-02 5.582e-02
## country_nameItaly 1.475e-01 4.612e-02
## country_nameJapan 3.393e-01 4.821e-02
## country_nameKazakhstan 5.796e-03 2.174e-02
## country_nameKorea, Republic of 8.585e-02 4.333e-02
## country_nameKyrgyzstan 7.449e-02 2.606e-02
## country_nameLatvia -4.144e-02 2.821e-02
## country_nameLithuania -3.740e-02 2.878e-02
## country_nameLuxembourg -1.562e-01 7.023e-02
## country_nameMacedonia, the former Yugoslav Republic of 1.636e-03 1.090e-02
## country_nameMexico 2.547e-01 2.859e-02
## country_nameMoldova, Republic of 6.680e-02 1.958e-02
## country_nameMontenegro -1.366e-02 1.603e-02
## country_nameMorocco 1.152e-01 1.808e-02
## country_nameNetherlands 9.121e-04 5.308e-02
## country_nameNorway -1.098e-01 6.362e-02
## country_namePoland 1.089e-01 2.804e-02
## country_namePortugal -3.161e-02 3.614e-02
## country_nameRomania 2.529e-02 1.806e-02
## country_nameRussian Federation 5.642e-01 2.703e-02
## country_nameSenegal 1.325e-01 3.297e-02
## country_nameSerbia 3.167e-02 1.379e-02
## country_nameSlovakia -2.892e-02 3.672e-02
## country_nameSlovenia -6.427e-02 3.888e-02
## country_nameSpain 8.657e-02 4.035e-02
## country_nameSwitzerland -9.905e-02 6.734e-02
## country_nameTajikistan 1.063e-01 3.181e-02
## country_nameThailand 4.018e-01 2.208e-02
## country_nameTunisia 4.078e-02 1.268e-02
## country_nameUkraine 1.790e-01 1.524e-02
## country_nameUnited Kingdom 1.158e-01 5.261e-02
## country_nameUnited States of America 1.693e+00 6.564e-02
## country_nameUruguay -3.539e-02 3.639e-02
## country_nameVenezuela 3.949e-02 3.379e-02
## country_nameViet Nam 4.308e-01 2.531e-02
## t value Pr(>|t|)
## (Intercept) 0.411 0.681365
## PKcal -11.904 < 2e-16 ***
## calperg_food_w_calorie -2.196 0.028947 *
## log(GDP_pcap_thous2015USD_FAO) 2.423 0.016058 *
## year -0.411 0.681672
## country_nameArmenia 0.304 0.761526
## country_nameAustralia 1.354 0.176798
## country_nameAustria -0.992 0.322259
## country_nameAzerbaijan 1.439 0.151336
## country_nameBelarus 1.911 0.057084 .
## country_nameBelgium -0.278 0.781389
## country_nameBenin 3.102 0.002127 **
## country_nameBosnia and Herzegovina 0.187 0.851971
## country_nameBotswana -0.218 0.827400
## country_nameBrazil 39.244 < 2e-16 ***
## country_nameBulgaria 0.720 0.472290
## country_nameCanada 0.487 0.626514
## country_nameChina 20.792 < 2e-16 ***
## country_nameColombia 8.597 6.57e-16 ***
## country_nameCongo 2.610 0.009553 **
## country_nameCosta Rica -0.032 0.974778
## country_nameCroatia -0.952 0.342033
## country_nameCyprus -1.659 0.098189 .
## country_nameCzech Republic -0.373 0.709135
## country_nameDenmark -1.370 0.171813
## country_nameDominican Republic 1.352 0.177511
## country_nameEstonia -1.796 0.073584 .
## country_nameFinland -1.616 0.107150
## country_nameGeorgia 2.407 0.016759 *
## country_nameGermany 5.345 1.92e-07 ***
## country_nameGreece -0.753 0.451948
## country_nameHungary 0.187 0.851670
## country_nameIceland -2.051 0.041219 *
## country_nameIreland -1.572 0.117037
## country_nameItaly 3.197 0.001551 **
## country_nameJapan 7.038 1.59e-11 ***
## country_nameKazakhstan 0.267 0.790028
## country_nameKorea, Republic of 1.981 0.048555 *
## country_nameKyrgyzstan 2.859 0.004583 **
## country_nameLatvia -1.469 0.143076
## country_nameLithuania -1.299 0.194921
## country_nameLuxembourg -2.223 0.027012 *
## country_nameMacedonia, the former Yugoslav Republic of 0.150 0.880733
## country_nameMexico 8.912 < 2e-16 ***
## country_nameMoldova, Republic of 3.412 0.000742 ***
## country_nameMontenegro -0.852 0.394709
## country_nameMorocco 6.368 8.12e-10 ***
## country_nameNetherlands 0.017 0.986302
## country_nameNorway -1.725 0.085648 .
## country_namePoland 3.883 0.000129 ***
## country_namePortugal -0.875 0.382561
## country_nameRomania 1.400 0.162521
## country_nameRussian Federation 20.875 < 2e-16 ***
## country_nameSenegal 4.019 7.57e-05 ***
## country_nameSerbia 2.296 0.022445 *
## country_nameSlovakia -0.788 0.431631
## country_nameSlovenia -1.653 0.099446 .
## country_nameSpain 2.145 0.032801 *
## country_nameSwitzerland -1.471 0.142475
## country_nameTajikistan 3.343 0.000947 ***
## country_nameThailand 18.199 < 2e-16 ***
## country_nameTunisia 3.215 0.001460 **
## country_nameUkraine 11.743 < 2e-16 ***
## country_nameUnited Kingdom 2.200 0.028625 *
## country_nameUnited States of America 25.797 < 2e-16 ***
## country_nameUruguay -0.972 0.331780
## country_nameVenezuela 1.169 0.243445
## country_nameViet Nam 17.016 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.01248 on 272 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9986, Adjusted R-squared: 0.9983
## F-statistic: 2914 on 67 and 272 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) -1.545540e+00
## PKcal -1.759255e+00
## calperg_food_w_calorie -8.332117e-05
## log(GDP_pcap_thous2015USD_FAO) 9.207703e-03
## year -1.193076e-03
## country_nameArmenia -1.770581e-02
## country_nameAustralia -3.421198e-02
## country_nameAustria -1.651515e-01
## country_nameAzerbaijan -7.376829e-03
## country_nameBelarus -7.811893e-04
## country_nameBelgium -1.206490e-01
## country_nameBenin 3.673937e-02
## country_nameBosnia and Herzegovina -1.725347e-02
## country_nameBotswana -4.341262e-02
## country_nameBrazil 1.225013e+00
## country_nameBulgaria -2.714277e-02
## country_nameCanada -7.914227e-02
## country_nameChina 3.774985e+00
## country_nameColombia 1.039828e-01
## country_nameCongo 1.199170e-02
## country_nameCosta Rica -6.074159e-02
## country_nameCroatia -8.156226e-02
## country_nameCyprus -1.560175e-01
## country_nameCzech Republic -8.440649e-02
## country_nameDenmark -1.917479e-01
## country_nameDominican Republic -9.902939e-03
## country_nameEstonia -1.251399e-01
## country_nameFinland -1.889169e-01
## country_nameGeorgia 6.052745e-03
## country_nameGermany 1.683915e-01
## country_nameGreece -9.930076e-02
## country_nameHungary -5.659306e-02
## country_nameIceland -2.247981e-01
## country_nameIreland -1.976610e-01
## country_nameItaly 5.666417e-02
## country_nameJapan 2.443852e-01
## country_nameKazakhstan -3.701402e-02
## country_nameKorea, Republic of 5.486725e-04
## country_nameKyrgyzstan 2.318989e-02
## country_nameLatvia -9.697778e-02
## country_nameLithuania -9.406517e-02
## country_nameLuxembourg -2.944184e-01
## country_nameMacedonia, the former Yugoslav Republic of -1.981610e-02
## country_nameMexico 1.984663e-01
## country_nameMoldova, Republic of 2.826263e-02
## country_nameMontenegro -4.521623e-02
## country_nameMorocco 7.955760e-02
## country_nameNetherlands -1.035801e-01
## country_nameNorway -2.350182e-01
## country_namePoland 5.368954e-02
## country_namePortugal -1.027642e-01
## country_nameRomania -1.026094e-02
## country_nameRussian Federation 5.110330e-01
## country_nameSenegal 6.760210e-02
## country_nameSerbia 4.512446e-03
## country_nameSlovakia -1.012150e-01
## country_nameSlovenia -1.408059e-01
## country_nameSpain 7.131166e-03
## country_nameSwitzerland -2.316284e-01
## country_nameTajikistan 4.369749e-02
## country_nameThailand 3.583202e-01
## country_nameTunisia 1.581147e-02
## country_nameUkraine 1.489981e-01
## country_nameUnited Kingdom 1.218509e-02
## country_nameUnited States of America 1.563983e+00
## country_nameUruguay -1.070360e-01
## country_nameVenezuela -2.702104e-02
## country_nameViet Nam 3.809164e-01
## 97.5 %
## (Intercept) 2.361217e+00
## PKcal -1.259919e+00
## calperg_food_w_calorie -4.544311e-06
## log(GDP_pcap_thous2015USD_FAO) 8.906463e-02
## year 7.812784e-04
## country_nameArmenia 2.416694e-02
## country_nameAustralia 1.849935e-01
## country_nameAustria 5.450988e-02
## country_nameAzerbaijan 4.744223e-02
## country_nameBelarus 5.230450e-02
## country_nameBelgium 9.081207e-02
## country_nameBenin 1.644227e-01
## country_nameBosnia and Herzegovina 2.087047e-02
## country_nameBotswana 3.474793e-02
## country_nameBrazil 1.354412e+00
## country_nameBulgaria 5.842678e-02
## country_nameCanada 1.311932e-01
## country_nameChina 4.564649e+00
## country_nameColombia 1.657560e-01
## country_nameCongo 8.560903e-02
## country_nameCosta Rica 5.881977e-02
## country_nameCroatia 2.839915e-02
## country_nameCyprus 1.330189e-02
## country_nameCzech Republic 5.749241e-02
## country_nameDenmark 3.438471e-02
## country_nameDominican Republic 5.331798e-02
## country_nameEstonia 5.736975e-03
## country_nameFinland 1.856090e-02
## country_nameGeorgia 6.045176e-02
## country_nameGermany 3.647753e-01
## country_nameGreece 4.434160e-02
## country_nameHungary 6.848410e-02
## country_nameIceland -4.604513e-03
## country_nameIreland 2.212671e-02
## country_nameItaly 2.382663e-01
## country_nameJapan 4.342199e-01
## country_nameKazakhstan 4.860570e-02
## country_nameKorea, Republic of 1.711549e-01
## country_nameKyrgyzstan 1.257908e-01
## country_nameLatvia 1.410763e-02
## country_nameLithuania 1.926631e-02
## country_nameLuxembourg -1.788475e-02
## country_nameMacedonia, the former Yugoslav Republic of 2.308905e-02
## country_nameMexico 3.110215e-01
## country_nameMoldova, Republic of 1.053428e-01
## country_nameMontenegro 1.789081e-02
## country_nameMorocco 1.507609e-01
## country_nameNetherlands 1.054042e-01
## country_nameNorway 1.550163e-02
## country_namePoland 1.641080e-01
## country_namePortugal 3.954394e-02
## country_nameRomania 6.083366e-02
## country_nameRussian Federation 6.174606e-01
## country_nameSenegal 1.974339e-01
## country_nameSerbia 5.882658e-02
## country_nameSlovakia 4.337337e-02
## country_nameSlovenia 1.226681e-02
## country_nameSpain 1.659999e-01
## country_nameSwitzerland 3.352420e-02
## country_nameTajikistan 1.689382e-01
## country_nameThailand 4.452502e-01
## country_nameTunisia 6.575258e-02
## country_nameUkraine 2.090210e-01
## country_nameUnited Kingdom 2.193438e-01
## country_nameUnited States of America 1.822425e+00
## country_nameUruguay 3.626541e-02
## country_nameVenezuela 1.060098e-01
## country_nameViet Nam 4.805897e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32588 -0.02033 -0.00011 0.01008 0.40049
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.872e+00 4.537e+00 1.074 0.28366
## staples -9.811e-01 3.519e-01 -2.788 0.00561 **
## nonstaples_animal -1.195e+00 1.551e+00 -0.770 0.44165
## nonstaples_other 7.888e+00 7.064e-01 11.167 < 2e-16 ***
## calperg_food_w_calorie -1.637e-05 2.087e-05 -0.785 0.43329
## log(GDP_pcap_thous2015USD_FAO) -3.099e-03 3.907e-03 -0.793 0.42815
## year -2.405e-03 2.254e-03 -1.067 0.28675
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07121 on 333 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9445, Adjusted R-squared: 0.9435
## F-statistic: 945.2 on 6 and 333 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -4.052794e+00 1.379720e+01
## staples -1.673424e+00 -2.888328e-01
## nonstaples_animal -4.244901e+00 1.855811e+00
## nonstaples_other 6.498663e+00 9.277742e+00
## calperg_food_w_calorie -5.742938e-05 2.468199e-05
## log(GDP_pcap_thous2015USD_FAO) -1.078385e-02 4.585479e-03
## year -6.839983e-03 2.029194e-03
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32653 -0.01873 -0.00061 0.00971 0.40021
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.894e+00 4.539e+00 1.078 0.28170
## staples -9.459e-01 3.448e-01 -2.743 0.00642 **
## nonstaples_animal -1.333e+00 1.526e+00 -0.874 0.38285
## nonstaples_other 7.937e+00 6.996e-01 11.346 < 2e-16 ***
## calperg_food_w_calorie -1.771e-05 2.072e-05 -0.855 0.39328
## GDP_pcap_thous2015USD_FAO -1.157e-04 1.850e-04 -0.625 0.53214
## year -2.418e-03 2.255e-03 -1.072 0.28445
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07124 on 333 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9445, Adjusted R-squared: 0.9435
## F-statistic: 944.5 on 6 and 333 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -4.034239e+00 1.382175e+01
## staples -1.624279e+00 -2.675915e-01
## nonstaples_animal -4.334219e+00 1.667966e+00
## nonstaples_other 6.561199e+00 9.313561e+00
## calperg_food_w_calorie -5.847677e-05 2.305022e-05
## GDP_pcap_thous2015USD_FAO -4.795326e-04 2.481771e-04
## year -6.853738e-03 2.018351e-03
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.33183 -0.01961 0.00162 0.00839 0.40193
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -9.791e-01 3.520e-01 -2.781 0.00572 **
## nonstaples_animal -1.198e+00 1.551e+00 -0.772 0.44049
## nonstaples_other 7.887e+00 7.065e-01 11.163 < 2e-16 ***
## calperg_food_w_calorie -1.618e-05 2.088e-05 -0.775 0.43877
## log(GDP_pcap_thous2015USD_FAO) -3.127e-03 3.907e-03 -0.800 0.42414
## year 1.540e-05 1.704e-05 0.904 0.36674
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07123 on 334 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9512, Adjusted R-squared: 0.9504
## F-statistic: 1086 on 6 and 334 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -1.671513e+00 -2.866397e-01
## nonstaples_animal -4.248852e+00 1.853180e+00
## nonstaples_other 6.497047e+00 9.276730e+00
## calperg_food_w_calorie -5.724556e-05 2.488075e-05
## log(GDP_pcap_thous2015USD_FAO) -1.081305e-02 4.559308e-03
## year -1.811846e-05 4.892120e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.44105 -0.04263 -0.02488 0.00292 0.68816
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.243e+00 3.240e-02 38.368 < 2e-16 ***
## calperg_food_w_calorie 5.968e-05 3.506e-05 1.702 0.08963 .
## log(GDP_pcap_thous2015USD_FAO) 1.765e-02 6.501e-03 2.715 0.00697 **
## year -5.546e-05 2.965e-05 -1.871 0.06226 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1291 on 336 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.839, Adjusted R-squared: 0.837
## F-statistic: 437.6 on 4 and 336 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.179413e+00 1.306879e+00
## calperg_food_w_calorie -9.281550e-06 1.286367e-04
## log(GDP_pcap_thous2015USD_FAO) 4.863351e-03 3.043845e-02
## year -1.137810e-04 2.857465e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43173 -0.04381 -0.02202 0.00232 0.64434
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.273e+00 3.235e-02 39.339 < 2e-16 ***
## staples_frac -5.024e-01 1.178e-01 -4.264 2.62e-05 ***
## calperg_food_w_calorie 9.773e-05 3.534e-05 2.765 0.006 **
## log(GDP_pcap_thous2015USD_FAO) -1.467e-02 9.882e-03 -1.484 0.139
## year 5.554e-05 3.891e-05 1.427 0.154
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1259 on 335 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8472, Adjusted R-squared: 0.845
## F-statistic: 371.6 on 5 and 335 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.208999e+00 1.3362700851
## staples_frac -7.341577e-01 -0.2706216349
## calperg_food_w_calorie 2.821090e-05 0.0001672392
## log(GDP_pcap_thous2015USD_FAO) -3.410438e-02 0.0047720649
## year -2.099777e-05 0.0001320785
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.43111 -0.04367 -0.02164 0.00225 0.64412
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.273e+00 3.235e-02 39.344 < 2e-16 ***
## nonstaples_frac 5.033e-01 1.178e-01 4.271 2.54e-05 ***
## calperg_food_w_calorie 9.777e-05 3.534e-05 2.767 0.00597 **
## log(GDP_pcap_thous2015USD_FAO) -1.472e-02 9.881e-03 -1.490 0.13728
## year -1.943e-04 4.351e-05 -4.466 1.09e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1259 on 335 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.8473, Adjusted R-squared: 0.845
## F-statistic: 371.7 on 5 and 335 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.209057e+00 1.3363180954
## nonstaples_frac 2.714843e-01 0.7350588901
## calperg_food_w_calorie 2.826688e-05 0.0001672805
## log(GDP_pcap_thous2015USD_FAO) -3.415555e-02 0.0047183792
## year -2.799097e-04 -0.0001087343
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31088 -0.01821 -0.00598 0.01143 0.42557
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 5.050e+00 1.477e-01 34.198 <2e-16 ***
## staples_frac -5.553e-02 7.040e-02 -0.789 0.4308
## calperg_food_w_calorie 1.950e-05 2.069e-05 0.942 0.3467
## log(GDP_pcap_thous2015USD_FAO) -1.150e-02 5.724e-03 -2.010 0.0453 *
## year 9.623e-06 2.260e-05 0.426 0.6706
## PKcal:staples_frac -7.326e+00 2.841e-01 -25.788 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0729 on 334 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9489, Adjusted R-squared: 0.948
## F-statistic: 1034 on 6 and 334 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 4.759238e+00 5.340158e+00
## staples_frac -1.940044e-01 8.294317e-02
## calperg_food_w_calorie -2.119828e-05 6.019044e-05
## log(GDP_pcap_thous2015USD_FAO) -2.276132e-02 -2.434601e-04
## year -3.483697e-05 5.408324e-05
## PKcal:staples_frac -7.885351e+00 -6.767628e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.083958 -0.006889 0.000190 0.005945 0.100248
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 8.716e+00 4.503e+00 1.936 0.05379 .
## Corn -9.826e+00 7.297e-01 -13.467 < 2e-16 ***
## Dairy 1.277e+01 2.081e+00 6.134 2.57e-09 ***
## FiberCrop 6.674e+01 1.123e+01 5.941 7.50e-09 ***
## Fruits -7.355e+00 3.101e+00 -2.371 0.01833 *
## Legumes 4.197e+01 5.480e+00 7.660 2.32e-13 ***
## MiscCrop 5.238e-01 9.923e+00 0.053 0.95793
## NutsSeeds -1.306e+00 4.642e+00 -0.281 0.77855
## OilCrop -7.470e+00 1.169e+00 -6.388 6.04e-10 ***
## OilPalm -1.493e+01 3.544e+00 -4.214 3.28e-05 ***
## OtherGrain -3.229e+00 2.106e+00 -1.533 0.12626
## OtherMeat_Fish -1.731e+00 3.692e+00 -0.469 0.63940
## Poultry 1.921e+01 3.173e+00 6.053 4.04e-09 ***
## Rice 6.704e+00 5.543e-01 12.096 < 2e-16 ***
## RootTuber -1.545e+01 2.546e+00 -6.068 3.71e-09 ***
## SheepGoat 3.242e+01 1.368e+01 2.370 0.01838 *
## Soybean -1.018e+01 1.772e+00 -5.746 2.16e-08 ***
## SugarCrop 1.136e+01 1.594e+00 7.127 7.04e-12 ***
## Vegetables -1.105e+01 3.897e+00 -2.837 0.00485 **
## Wheat -4.618e-01 4.584e-01 -1.008 0.31444
## NEC 3.827e+00 1.386e+00 2.762 0.00609 **
## Pork 7.971e-01 1.481e+00 0.538 0.59093
## calperg_food_w_calorie -1.307e-05 6.761e-06 -1.934 0.05404 .
## log(GDP_pcap_thous2015USD_FAO) 8.281e-04 1.238e-03 0.669 0.50409
## year 9.095e-06 5.571e-06 1.633 0.10355
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0185 on 315 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9969, Adjusted R-squared: 0.9967
## F-statistic: 4049 on 25 and 315 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -1.428373e-01 1.757555e+01
## Corn -1.126181e+01 -8.390528e+00
## Dairy 8.671072e+00 1.686077e+01
## FiberCrop 4.463900e+01 8.884673e+01
## Fruits -1.345682e+01 -1.252403e+00
## Legumes 3.119046e+01 5.275326e+01
## MiscCrop -1.899942e+01 2.004712e+01
## NutsSeeds -1.043873e+01 7.825964e+00
## OilCrop -9.771457e+00 -5.169447e+00
## OilPalm -2.190701e+01 -7.961891e+00
## OtherGrain -7.372650e+00 9.149471e-01
## OtherMeat_Fish -8.994994e+00 5.532174e+00
## Poultry 1.296310e+01 2.544894e+01
## Rice 5.613996e+00 7.795001e+00
## RootTuber -2.045679e+01 -1.043894e+01
## SheepGoat 5.507613e+00 5.932289e+01
## Soybean -1.366728e+01 -6.694962e+00
## SugarCrop 8.222544e+00 1.449386e+01
## Vegetables -1.871943e+01 -3.386461e+00
## Wheat -1.363664e+00 4.400104e-01
## NEC 1.100793e+00 6.554159e+00
## Pork -2.117692e+00 3.711815e+00
## calperg_food_w_calorie -2.637817e-05 2.286278e-07
## log(GDP_pcap_thous2015USD_FAO) -1.607937e-03 3.264120e-03
## year -1.865550e-06 2.005489e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46393 -0.04561 -0.02732 -0.01062 0.75545
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.625e-06 4.838e-08 33.594 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.077e-02 7.245e-03 2.867 0.00441 **
## year -5.463e-06 1.015e-05 -0.538 0.59097
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1441 on 337 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.7988, Adjusted R-squared: 0.797
## F-statistic: 445.9 on 3 and 337 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.530209e-06 1.720549e-06
## log(GDP_pcap_thous2015USD_FAO) 6.517757e-03 3.501944e-02
## year -2.543751e-05 1.451216e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36512 -0.01302 -0.00064 0.00292 0.57313
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -2.749e-07 8.466e-08 -3.247 0.00128 **
## Feed_Kt 7.372e-06 3.079e-07 23.941 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.459e-04 4.493e-03 0.055 0.95639
## year -1.589e-06 6.185e-06 -0.257 0.79738
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08771 on 336 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9256, Adjusted R-squared: 0.9247
## F-statistic: 1045 on 4 and 336 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -4.414315e-07 -1.083554e-07
## Feed_Kt 6.766484e-06 7.977938e-06
## log(GDP_pcap_thous2015USD_FAO) -8.592846e-03 9.084690e-03
## year -1.375469e-05 1.057645e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.39394 -0.01416 -0.00255 0.00138 0.58246
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -1.389e-01 7.354e-02 -1.889 0.0598 .
## Feed_Kt 7.087e-06 3.621e-07 19.573 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.445e-03 4.537e-03 0.318 0.7504
## year -2.089e-06 6.253e-06 -0.334 0.7386
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0886 on 336 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.9241, Adjusted R-squared: 0.9232
## F-statistic: 1023 on 4 and 336 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -2.835441e-01 5.772530e-03
## Feed_Kt 6.375158e-06 7.799712e-06
## log(GDP_pcap_thous2015USD_FAO) -7.479672e-03 1.036885e-02
## year -1.438899e-05 1.021148e-05
## png
## 2
plot_ly(comb_data_sel_7) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_7) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
comb_data_sel_8 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_high_inonspec_fuel) %>%
anti_join(country_years_excl_low_foodpro)
calc_lin_model_food_en_use_production(comb_data_sel_8, "8")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74961 -0.03384 -0.02709 -0.00954 0.77812
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.034513 0.003021 11.43 <2e-16 ***
## PKcal 1.010933 0.015691 64.43 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1215 on 1799 degrees of freedom
## Multiple R-squared: 0.6976, Adjusted R-squared: 0.6975
## F-statistic: 4151 on 1 and 1799 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.80053 0.00006 0.00649 0.02261 0.78881
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.06828 0.01539 69.41 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1258 on 1800 degrees of freedom
## Multiple R-squared: 0.728, Adjusted R-squared: 0.7278
## F-statistic: 4817 on 1 and 1800 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75187 -0.03432 -0.02719 -0.00908 0.77693
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.846e-02 2.382e-02 2.454 0.0142 *
## PKcal 1.011e+00 1.569e-02 64.396 <2e-16 ***
## calperg_food_w_calorie -1.359e-05 1.341e-05 -1.013 0.3110
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1215 on 1798 degrees of freedom
## Multiple R-squared: 0.6978, Adjusted R-squared: 0.6975
## F-statistic: 2076 on 2 and 1798 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74422 -0.03422 -0.02351 -0.00515 0.74921
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.059e-02 2.538e-02 1.205 0.228
## PKcal 1.014e+00 1.599e-02 63.375 < 2e-16 ***
## calperg_food_w_calorie -4.850e-06 1.414e-05 -0.343 0.732
## GDP_pcap_thous2015USD_FAO 7.502e-04 1.558e-04 4.814 1.61e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1234 on 1714 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.7011, Adjusted R-squared: 0.7005
## F-statistic: 1340 on 3 and 1714 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73699 -0.04157 -0.01847 0.00021 0.74331
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -6.258e-03 2.621e-02 -0.239 0.811
## PKcal 1.019e+00 1.592e-02 64.014 < 2e-16 ***
## calperg_food_w_calorie -1.679e-06 1.406e-05 -0.119 0.905
## log(GDP_pcap_thous2015USD_FAO) 1.892e-02 2.729e-03 6.932 5.87e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1225 on 1714 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.7053, Adjusted R-squared: 0.7048
## F-statistic: 1367 on 3 and 1714 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74497 -0.03389 -0.02385 -0.00548 0.75566
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0320306 0.0250302 1.280 0.201
## PKcal 1.0145441 0.0158724 63.919 < 2e-16 ***
## calperg_food_w_calorie -0.0000058 0.0000139 -0.417 0.676
## GDP_pcap_thous2015USD_calc 0.0006289 0.0001343 4.682 3.06e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1225 on 1743 degrees of freedom
## (54 observations deleted due to missingness)
## Multiple R-squared: 0.7011, Adjusted R-squared: 0.7006
## F-statistic: 1363 on 3 and 1743 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73669 -0.04161 -0.01849 0.00057 0.74340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.009266 0.007216 -1.284 0.199
## PKcal 1.018825 0.015907 64.049 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.018945 0.002720 6.966 4.63e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1225 on 1715 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.7053, Adjusted R-squared: 0.7049
## F-statistic: 2052 on 2 and 1715 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.37992 -0.01734 -0.00673 0.00349 0.65311
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.309e-03 2.276e-03 3.212 0.00134 **
## PKcal -7.777e-01 8.385e-02 -9.275 < 2e-16 ***
## PKcal:calperg_food_w_calorie 6.624e-04 4.643e-05 14.267 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.205e-01 1.165e-02 44.692 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08419 on 1714 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.8609, Adjusted R-squared: 0.8606
## F-statistic: 3535 on 3 and 1714 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.36555 -0.02582 -0.01037 0.01193 0.64224
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.258e-01 1.867e-02 6.740 2.16e-11 ***
## PKcal -1.010e+00 8.841e-02 -11.428 < 2e-16 ***
## calperg_food_w_calorie -5.050e-05 1.007e-05 -5.012 5.94e-07 ***
## log(GDP_pcap_thous2015USD_FAO) -1.353e-02 1.976e-03 -6.846 1.06e-11 ***
## PKcal:calperg_food_w_calorie 7.711e-04 4.863e-05 15.855 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.561e-01 1.233e-02 45.106 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08267 on 1712 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.866, Adjusted R-squared: 0.8656
## F-statistic: 2212 on 5 and 1712 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 8.919394e-02 0.1624140309
## PKcal -1.183796e+00 -0.8369866365
## calperg_food_w_calorie -7.025572e-05 -0.0000307355
## log(GDP_pcap_thous2015USD_FAO) -1.740207e-02 -0.0096511584
## PKcal:calperg_food_w_calorie 6.756917e-04 0.0008664691
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.319144e-01 0.5802757527
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73697 -0.04073 -0.01813 -0.00119 0.74533
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.585e-01 4.868e-01 1.147 0.251
## PKcal 1.020e+00 1.597e-02 63.899 < 2e-16 ***
## calperg_food_w_calorie -3.853e-06 1.418e-05 -0.272 0.786
## log(GDP_pcap_thous2015USD_FAO) 1.954e-02 2.780e-03 7.026 3.05e-12 ***
## year -2.817e-04 2.425e-04 -1.162 0.245
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1225 on 1713 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.7055, Adjusted R-squared: 0.7048
## F-statistic: 1026 on 4 and 1713 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -3.963110e-01 1.513283e+00
## PKcal 9.889908e-01 1.051626e+00
## calperg_food_w_calorie -3.166014e-05 2.395389e-05
## log(GDP_pcap_thous2015USD_FAO) 1.408280e-02 2.498925e-02
## year -7.572959e-04 1.938783e-04
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.48898 -0.00510 -0.00019 0.00408 0.33189
##
## Coefficients:
## Estimate Std. Error
## (Intercept) 5.451e-01 2.666e-01
## PKcal 2.479e+00 6.170e-02
## calperg_food_w_calorie -2.416e-05 1.367e-05
## log(GDP_pcap_thous2015USD_FAO) 5.623e-04 4.761e-03
## year -2.591e-04 1.320e-04
## country_nameArmenia 5.227e-03 1.791e-02
## country_nameAustralia 6.614e-02 2.111e-02
## country_nameAustria 4.399e-03 2.254e-02
## country_nameAzerbaijan 2.871e-03 1.676e-02
## country_nameBelarus 3.798e-03 1.527e-02
## country_nameBelgium 2.229e-02 2.402e-02
## country_nameBenin -4.613e-03 2.163e-02
## country_nameBosnia and Herzegovina -1.002e-03 2.580e-02
## country_nameBotswana 1.409e-02 1.893e-02
## country_nameBrazil 1.061e-01 2.142e-02
## country_nameBulgaria 9.114e-03 1.847e-02
## country_nameCanada -4.766e-02 2.349e-02
## country_nameChile -1.007e-02 3.971e-02
## country_nameChina -2.402e+00 9.209e-02
## country_nameColombia -3.055e-02 1.669e-02
## country_nameCongo 1.143e-02 5.179e-02
## country_nameCosta Rica 2.029e-02 2.093e-02
## country_nameCote dIvoire -2.457e-02 5.195e-02
## country_nameCroatia 9.706e-03 1.824e-02
## country_nameCyprus 9.441e-03 1.959e-02
## country_nameCzech Republic 1.222e-02 2.153e-02
## country_nameDenmark 2.403e-02 2.203e-02
## country_nameDominican Republic 1.361e-02 1.866e-02
## country_nameEstonia 8.565e-03 1.671e-02
## country_nameFinland 1.002e-02 2.503e-02
## country_nameFrance -5.803e-02 2.263e-02
## country_nameGeorgia 8.590e-03 1.748e-02
## country_nameGermany -2.170e-02 2.144e-02
## country_nameGreece -1.442e-02 1.845e-02
## country_nameHungary 9.758e-03 1.869e-02
## country_nameIceland 1.241e-02 2.128e-02
## country_nameIreland 1.712e-02 2.163e-02
## country_nameItaly -1.156e-01 2.133e-02
## country_nameJapan -1.269e-01 2.202e-02
## country_nameKazakhstan 9.377e-03 1.798e-02
## country_nameKorea, Republic of -6.809e-02 2.005e-02
## country_nameKyrgyzstan 5.943e-03 1.819e-02
## country_nameLatvia 7.285e-03 1.626e-02
## country_nameLithuania 7.299e-03 1.601e-02
## country_nameLuxembourg 8.294e-03 2.523e-02
## country_nameMacedonia, the former Yugoslav Republic of 8.170e-03 1.684e-02
## country_nameMexico -1.874e-01 2.150e-02
## country_nameMoldova, Republic of 1.003e-02 1.642e-02
## country_nameMontenegro 9.034e-03 2.079e-02
## country_nameMorocco -6.043e-02 2.120e-02
## country_nameNetherlands 3.451e-02 2.034e-02
## country_nameNorway 1.149e-02 2.270e-02
## country_namePhilippines -1.038e-01 2.164e-02
## country_namePoland -2.715e-02 1.749e-02
## country_namePortugal -5.795e-03 1.911e-02
## country_nameRomania -2.792e-02 1.722e-02
## country_nameRussian Federation 6.349e-02 2.012e-02
## country_nameSenegal 9.240e-03 4.106e-02
## country_nameSerbia 1.219e-02 2.223e-02
## country_nameSlovakia 1.339e-02 2.085e-02
## country_nameSlovenia 1.028e-02 2.179e-02
## country_nameSpain -3.712e-02 1.900e-02
## country_nameSweden -9.039e-05 2.410e-02
## country_nameSwitzerland -1.319e-03 2.395e-02
## country_nameTajikistan 7.485e-03 1.726e-02
## country_nameThailand 8.182e-02 2.199e-02
## country_nameTunisia -1.284e-02 2.107e-02
## country_nameTurkey -1.625e-01 1.935e-02
## country_nameTurkmenistan 2.464e-02 1.962e-02
## country_nameUkraine -1.373e-02 1.721e-02
## country_nameUnited Kingdom -1.894e-02 2.520e-02
## country_nameUnited States of America -2.066e-03 3.598e-02
## country_nameUruguay 1.913e-02 3.341e-02
## country_nameUzbekistan -1.962e-02 1.914e-02
## country_nameVenezuela -2.992e-02 2.203e-02
## country_nameViet Nam 1.271e-02 5.238e-02
## t value Pr(>|t|)
## (Intercept) 2.045 0.041030 *
## PKcal 40.178 < 2e-16 ***
## calperg_food_w_calorie -1.768 0.077300 .
## log(GDP_pcap_thous2015USD_FAO) 0.118 0.905982
## year -1.963 0.049852 *
## country_nameArmenia 0.292 0.770491
## country_nameAustralia 3.133 0.001760 **
## country_nameAustria 0.195 0.845317
## country_nameAzerbaijan 0.171 0.863998
## country_nameBelarus 0.249 0.803612
## country_nameBelgium 0.928 0.353439
## country_nameBenin -0.213 0.831153
## country_nameBosnia and Herzegovina -0.039 0.969031
## country_nameBotswana 0.744 0.456791
## country_nameBrazil 4.956 7.95e-07 ***
## country_nameBulgaria 0.493 0.621861
## country_nameCanada -2.029 0.042633 *
## country_nameChile -0.254 0.799792
## country_nameChina -26.087 < 2e-16 ***
## country_nameColombia -1.830 0.067404 .
## country_nameCongo 0.221 0.825358
## country_nameCosta Rica 0.970 0.332373
## country_nameCote dIvoire -0.473 0.636289
## country_nameCroatia 0.532 0.594637
## country_nameCyprus 0.482 0.629956
## country_nameCzech Republic 0.568 0.570306
## country_nameDenmark 1.091 0.275588
## country_nameDominican Republic 0.729 0.465834
## country_nameEstonia 0.512 0.608387
## country_nameFinland 0.400 0.688988
## country_nameFrance -2.564 0.010433 *
## country_nameGeorgia 0.491 0.623223
## country_nameGermany -1.012 0.311658
## country_nameGreece -0.782 0.434371
## country_nameHungary 0.522 0.601763
## country_nameIceland 0.583 0.559924
## country_nameIreland 0.792 0.428743
## country_nameItaly -5.421 6.82e-08 ***
## country_nameJapan -5.760 9.99e-09 ***
## country_nameKazakhstan 0.522 0.602058
## country_nameKorea, Republic of -3.395 0.000702 ***
## country_nameKyrgyzstan 0.327 0.743910
## country_nameLatvia 0.448 0.654099
## country_nameLithuania 0.456 0.648548
## country_nameLuxembourg 0.329 0.742412
## country_nameMacedonia, the former Yugoslav Republic of 0.485 0.627537
## country_nameMexico -8.715 < 2e-16 ***
## country_nameMoldova, Republic of 0.610 0.541630
## country_nameMontenegro 0.435 0.663899
## country_nameMorocco -2.851 0.004419 **
## country_nameNetherlands 1.697 0.089860 .
## country_nameNorway 0.506 0.612662
## country_namePhilippines -4.795 1.78e-06 ***
## country_namePoland -1.552 0.120842
## country_namePortugal -0.303 0.761730
## country_nameRomania -1.621 0.105232
## country_nameRussian Federation 3.156 0.001626 **
## country_nameSenegal 0.225 0.821961
## country_nameSerbia 0.548 0.583668
## country_nameSlovakia 0.642 0.520750
## country_nameSlovenia 0.472 0.637213
## country_nameSpain -1.953 0.050969 .
## country_nameSweden -0.004 0.997009
## country_nameSwitzerland -0.055 0.956076
## country_nameTajikistan 0.434 0.664521
## country_nameThailand 3.720 0.000206 ***
## country_nameTunisia -0.609 0.542401
## country_nameTurkey -8.397 < 2e-16 ***
## country_nameTurkmenistan 1.256 0.209321
## country_nameUkraine -0.798 0.425152
## country_nameUnited Kingdom -0.752 0.452436
## country_nameUnited States of America -0.057 0.954218
## country_nameUruguay 0.573 0.566865
## country_nameUzbekistan -1.025 0.305315
## country_nameVenezuela -1.358 0.174745
## country_nameViet Nam 0.243 0.808332
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.04986 on 1642 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.9533, Adjusted R-squared: 0.9511
## F-statistic: 446.4 on 75 and 1642 DF, p-value: < 2.2e-16
##
## 2.5 %
## (Intercept) 2.224017e-02
## PKcal 2.358023e+00
## calperg_food_w_calorie -5.097809e-05
## log(GDP_pcap_thous2015USD_FAO) -8.775094e-03
## year -5.180245e-04
## country_nameArmenia -2.991102e-02
## country_nameAustralia 2.473595e-02
## country_nameAustria -3.981637e-02
## country_nameAzerbaijan -2.999985e-02
## country_nameBelarus -2.615370e-02
## country_nameBelgium -2.481269e-02
## country_nameBenin -4.704279e-02
## country_nameBosnia and Herzegovina -5.161379e-02
## country_nameBotswana -2.303960e-02
## country_nameBrazil 6.412193e-02
## country_nameBulgaria -2.712230e-02
## country_nameCanada -9.373554e-02
## country_nameChile -8.795776e-02
## country_nameChina -2.582880e+00
## country_nameColombia -6.328844e-02
## country_nameCongo -9.014967e-02
## country_nameCosta Rica -2.075633e-02
## country_nameCote dIvoire -1.264582e-01
## country_nameCroatia -2.606306e-02
## country_nameCyprus -2.898704e-02
## country_nameCzech Republic -3.000448e-02
## country_nameDenmark -1.918167e-02
## country_nameDominican Republic -2.299302e-02
## country_nameEstonia -2.421482e-02
## country_nameFinland -3.907718e-02
## country_nameFrance -1.024287e-01
## country_nameGeorgia -2.569764e-02
## country_nameGermany -6.376205e-02
## country_nameGreece -5.060880e-02
## country_nameHungary -2.690920e-02
## country_nameIceland -2.933091e-02
## country_nameIreland -2.530055e-02
## country_nameItaly -1.574885e-01
## country_nameJapan -1.700507e-01
## country_nameKazakhstan -2.588833e-02
## country_nameKorea, Republic of -1.074288e-01
## country_nameKyrgyzstan -2.973459e-02
## country_nameLatvia -2.459839e-02
## country_nameLithuania -2.410727e-02
## country_nameLuxembourg -4.119644e-02
## country_nameMacedonia, the former Yugoslav Republic of -2.485190e-02
## country_nameMexico -2.295558e-01
## country_nameMoldova, Republic of -2.218772e-02
## country_nameMontenegro -3.173497e-02
## country_nameMorocco -1.020184e-01
## country_nameNetherlands -5.374264e-03
## country_nameNorway -3.302406e-02
## country_namePhilippines -1.462114e-01
## country_namePoland -6.146747e-02
## country_namePortugal -4.327518e-02
## country_nameRomania -6.169825e-02
## country_nameRussian Federation 2.403816e-02
## country_nameSenegal -7.128722e-02
## country_nameSerbia -3.141723e-02
## country_nameSlovakia -2.749922e-02
## country_nameSlovenia -3.246201e-02
## country_nameSpain -7.438880e-02
## country_nameSweden -4.736992e-02
## country_nameSwitzerland -4.829108e-02
## country_nameTajikistan -2.636065e-02
## country_nameThailand 3.868465e-02
## country_nameTunisia -5.417036e-02
## country_nameTurkey -2.004462e-01
## country_nameTurkmenistan -1.383863e-02
## country_nameUkraine -4.748303e-02
## country_nameUnited Kingdom -6.836098e-02
## country_nameUnited States of America -7.262976e-02
## country_nameUruguay -4.638836e-02
## country_nameUzbekistan -5.715648e-02
## country_nameVenezuela -7.313573e-02
## country_nameViet Nam -9.003789e-02
## 97.5 %
## (Intercept) 1.068043e+00
## PKcal 2.600069e+00
## calperg_food_w_calorie 2.648351e-06
## log(GDP_pcap_thous2015USD_FAO) 9.899799e-03
## year -1.673145e-07
## country_nameArmenia 4.036540e-02
## country_nameAustralia 1.075505e-01
## country_nameAustria 4.861372e-02
## country_nameAzerbaijan 3.574190e-02
## country_nameBelarus 3.374974e-02
## country_nameBelgium 6.939460e-02
## country_nameBenin 3.781635e-02
## country_nameBosnia and Herzegovina 4.960988e-02
## country_nameBotswana 5.121949e-02
## country_nameBrazil 1.481300e-01
## country_nameBulgaria 4.534946e-02
## country_nameCanada -1.584701e-03
## country_nameChile 6.781290e-02
## country_nameChina -2.221644e+00
## country_nameColombia 2.190425e-03
## country_nameCongo 1.130087e-01
## country_nameCosta Rica 6.134207e-02
## country_nameCote dIvoire 7.731862e-02
## country_nameCroatia 4.547509e-02
## country_nameCyprus 4.786907e-02
## country_nameCzech Republic 5.444887e-02
## country_nameDenmark 6.723254e-02
## country_nameDominican Republic 5.022122e-02
## country_nameEstonia 4.134399e-02
## country_nameFinland 5.911749e-02
## country_nameFrance -1.364064e-02
## country_nameGeorgia 4.287729e-02
## country_nameGermany 2.035750e-02
## country_nameGreece 2.175904e-02
## country_nameHungary 4.642472e-02
## country_nameIceland 5.414645e-02
## country_nameIreland 5.953755e-02
## country_nameItaly -7.379993e-02
## country_nameJapan -8.366275e-02
## country_nameKazakhstan 4.464275e-02
## country_nameKorea, Republic of -2.875665e-02
## country_nameKyrgyzstan 4.162118e-02
## country_nameLatvia 3.916822e-02
## country_nameLithuania 3.870617e-02
## country_nameLuxembourg 5.778494e-02
## country_nameMacedonia, the former Yugoslav Republic of 4.119247e-02
## country_nameMexico -1.452086e-01
## country_nameMoldova, Republic of 4.224068e-02
## country_nameMontenegro 4.980221e-02
## country_nameMorocco -1.885092e-02
## country_nameNetherlands 7.440010e-02
## country_nameNorway 5.600982e-02
## country_namePhilippines -6.131491e-02
## country_namePoland 7.161626e-03
## country_namePortugal 3.168531e-02
## country_nameRomania 5.864689e-03
## country_nameRussian Federation 1.029486e-01
## country_nameSenegal 8.976720e-02
## country_nameSerbia 5.578794e-02
## country_nameSlovakia 5.428073e-02
## country_nameSlovenia 5.301872e-02
## country_nameSpain 1.565336e-04
## country_nameSweden 4.718915e-02
## country_nameSwitzerland 4.565265e-02
## country_nameTajikistan 4.133023e-02
## country_nameThailand 1.249548e-01
## country_nameTunisia 2.849141e-02
## country_nameTurkey -1.245334e-01
## country_nameTurkmenistan 6.311076e-02
## country_nameUkraine 2.002657e-02
## country_nameUnited Kingdom 3.048639e-02
## country_nameUnited States of America 6.849829e-02
## country_nameUruguay 8.465770e-02
## country_nameUzbekistan 1.791121e-02
## country_nameVenezuela 1.330256e-02
## country_nameViet Nam 1.154566e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.56420 -0.02003 -0.00459 0.00835 0.45693
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.734e+00 2.819e-01 6.152 9.50e-10 ***
## staples -6.249e-01 3.125e-02 -19.996 < 2e-16 ***
## nonstaples_animal 3.212e-01 2.057e-01 1.562 0.1185
## nonstaples_other 6.348e+00 1.762e-01 36.027 < 2e-16 ***
## calperg_food_w_calorie -1.273e-05 8.004e-06 -1.590 0.1120
## log(GDP_pcap_thous2015USD_FAO) -2.781e-03 1.669e-03 -1.667 0.0957 .
## year -8.512e-04 1.404e-04 -6.062 1.65e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06894 on 1711 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.9069, Adjusted R-squared: 0.9066
## F-statistic: 2777 on 6 and 1711 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 1.181439e+00 2.287311e+00
## staples -6.861599e-01 -5.635782e-01
## nonstaples_animal -8.214555e-02 7.245900e-01
## nonstaples_other 6.002694e+00 6.693906e+00
## calperg_food_w_calorie -2.842537e-05 2.973193e-06
## log(GDP_pcap_thous2015USD_FAO) -6.053876e-03 4.912567e-04
## year -1.126598e-03 -5.757886e-04
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.56233 -0.01978 -0.00401 0.00773 0.45929
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.792e+00 2.839e-01 6.312 3.50e-10 ***
## staples -6.118e-01 3.034e-02 -20.166 < 2e-16 ***
## nonstaples_animal 2.569e-01 2.027e-01 1.267 0.205
## nonstaples_other 6.376e+00 1.758e-01 36.262 < 2e-16 ***
## calperg_food_w_calorie -1.239e-05 8.008e-06 -1.547 0.122
## GDP_pcap_thous2015USD_FAO -5.367e-05 9.222e-05 -0.582 0.561
## year -8.831e-04 1.412e-04 -6.255 5.02e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06898 on 1711 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.9067, Adjusted R-squared: 0.9064
## F-statistic: 2773 on 6 and 1711 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) 1.235204e+00 2.348897e+00
## staples -6.712938e-01 -5.522863e-01
## nonstaples_animal -1.407706e-01 6.545367e-01
## nonstaples_other 6.030681e+00 6.720356e+00
## calperg_food_w_calorie -2.809494e-05 3.316207e-06
## GDP_pcap_thous2015USD_FAO -2.345475e-04 1.272155e-04
## year -1.160027e-03 -6.061824e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.56781 -0.01698 -0.00612 0.00651 0.45787
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -6.355e-01 3.154e-02 -20.151 < 2e-16 ***
## nonstaples_animal 6.077e-01 2.025e-01 3.001 0.00273 **
## nonstaples_other 6.095e+00 1.731e-01 35.199 < 2e-16 ***
## calperg_food_w_calorie -3.039e-06 7.932e-06 -0.383 0.70163
## log(GDP_pcap_thous2015USD_FAO) -4.878e-03 1.651e-03 -2.955 0.00317 **
## year 1.147e-05 7.427e-06 1.545 0.12256
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06967 on 1712 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.9205, Adjusted R-squared: 0.9203
## F-statistic: 3306 on 6 and 1712 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -6.973352e-01 -5.736303e-01
## nonstaples_animal 2.105812e-01 1.004779e+00
## nonstaples_other 5.754944e+00 6.434145e+00
## calperg_food_w_calorie -1.859671e-05 1.251791e-05
## log(GDP_pcap_thous2015USD_FAO) -8.115994e-03 -1.640288e-03
## year -3.093195e-06 2.604214e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73684 -0.04154 -0.01840 0.00036 0.74331
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.019e+00 1.592e-02 63.998 < 2e-16 ***
## calperg_food_w_calorie -8.747e-07 1.394e-05 -0.063 0.950
## log(GDP_pcap_thous2015USD_FAO) 1.898e-02 2.738e-03 6.932 5.86e-12 ***
## year -3.929e-06 1.305e-05 -0.301 0.763
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1225 on 1714 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.754, Adjusted R-squared: 0.7534
## F-statistic: 1313 on 4 and 1714 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.876593e-01 1.050111e+00
## calperg_food_w_calorie -2.821399e-05 2.646466e-05
## log(GDP_pcap_thous2015USD_FAO) 1.361085e-02 2.435222e-02
## year -2.952972e-05 2.167256e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73720 -0.04126 -0.02195 0.00713 0.74230
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.033e+00 1.615e-02 63.979 < 2e-16 ***
## staples_frac -1.587e-01 3.500e-02 -4.533 6.22e-06 ***
## calperg_food_w_calorie 1.136e-05 1.412e-05 0.804 0.4214
## log(GDP_pcap_thous2015USD_FAO) 4.923e-03 4.127e-03 1.193 0.2331
## year 3.417e-05 1.546e-05 2.210 0.0273 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1218 on 1713 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.7569, Adjusted R-squared: 0.7562
## F-statistic: 1067 on 5 and 1713 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.001750e+00 1.065112e+00
## staples_frac -2.273286e-01 -9.001610e-02
## calperg_food_w_calorie -1.633857e-05 3.905170e-05
## log(GDP_pcap_thous2015USD_FAO) -3.171246e-03 1.301774e-02
## year 3.838664e-06 6.449237e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73723 -0.04130 -0.02202 0.00685 0.74288
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.034e+00 1.616e-02 63.964 < 2e-16 ***
## nonstaples_frac 1.591e-01 3.473e-02 4.581 4.97e-06 ***
## calperg_food_w_calorie 1.054e-05 1.408e-05 0.749 0.45425
## log(GDP_pcap_thous2015USD_FAO) 5.045e-03 4.083e-03 1.236 0.21671
## year -4.486e-05 1.576e-05 -2.847 0.00446 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1218 on 1713 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.757, Adjusted R-squared: 0.7563
## F-statistic: 1067 on 5 and 1713 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.002172e+00 1.065576e+00
## nonstaples_frac 9.096773e-02 2.271912e-01
## calperg_food_w_calorie -1.707763e-05 3.815675e-05
## log(GDP_pcap_thous2015USD_FAO) -2.962217e-03 1.305246e-02
## year -7.576282e-05 -1.395677e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.55653 -0.02057 -0.00837 0.00796 0.51644
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 3.577e+00 4.813e-02 74.320 < 2e-16 ***
## staples_frac -8.812e-03 2.148e-02 -0.410 0.681701
## calperg_food_w_calorie 2.092e-06 8.594e-06 0.243 0.807726
## log(GDP_pcap_thous2015USD_FAO) -9.617e-03 2.526e-03 -3.807 0.000145 ***
## year 1.391e-05 9.416e-06 1.477 0.139847
## PKcal:staples_frac -4.284e+00 7.935e-02 -53.984 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07414 on 1712 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.91, Adjusted R-squared: 0.9097
## F-statistic: 2887 on 6 and 1712 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 3.482308e+00 3.671091e+00
## staples_frac -5.094240e-02 3.331922e-02
## calperg_food_w_calorie -1.476415e-05 1.894770e-05
## log(GDP_pcap_thous2015USD_FAO) -1.457033e-02 -4.662791e-03
## year -4.560336e-06 3.237695e-05
## PKcal:staples_frac -4.439238e+00 -4.127975e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.083958 -0.006889 0.000190 0.005945 0.100248
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 8.716e+00 4.503e+00 1.936 0.05379 .
## Corn -9.826e+00 7.297e-01 -13.467 < 2e-16 ***
## Dairy 1.277e+01 2.081e+00 6.134 2.57e-09 ***
## FiberCrop 6.674e+01 1.123e+01 5.941 7.50e-09 ***
## Fruits -7.355e+00 3.101e+00 -2.371 0.01833 *
## Legumes 4.197e+01 5.480e+00 7.660 2.32e-13 ***
## MiscCrop 5.238e-01 9.923e+00 0.053 0.95793
## NutsSeeds -1.306e+00 4.642e+00 -0.281 0.77855
## OilCrop -7.470e+00 1.169e+00 -6.388 6.04e-10 ***
## OilPalm -1.493e+01 3.544e+00 -4.214 3.28e-05 ***
## OtherGrain -3.229e+00 2.106e+00 -1.533 0.12626
## OtherMeat_Fish -1.731e+00 3.692e+00 -0.469 0.63940
## Poultry 1.921e+01 3.173e+00 6.053 4.04e-09 ***
## Rice 6.704e+00 5.543e-01 12.096 < 2e-16 ***
## RootTuber -1.545e+01 2.546e+00 -6.068 3.71e-09 ***
## SheepGoat 3.242e+01 1.368e+01 2.370 0.01838 *
## Soybean -1.018e+01 1.772e+00 -5.746 2.16e-08 ***
## SugarCrop 1.136e+01 1.594e+00 7.127 7.04e-12 ***
## Vegetables -1.105e+01 3.897e+00 -2.837 0.00485 **
## Wheat -4.618e-01 4.584e-01 -1.008 0.31444
## NEC 3.827e+00 1.386e+00 2.762 0.00609 **
## Pork 7.971e-01 1.481e+00 0.538 0.59093
## calperg_food_w_calorie -1.307e-05 6.761e-06 -1.934 0.05404 .
## log(GDP_pcap_thous2015USD_FAO) 8.281e-04 1.238e-03 0.669 0.50409
## year 9.095e-06 5.571e-06 1.633 0.10355
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0185 on 315 degrees of freedom
## (1461 observations deleted due to missingness)
## Multiple R-squared: 0.9969, Adjusted R-squared: 0.9967
## F-statistic: 4049 on 25 and 315 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef -1.428373e-01 1.757555e+01
## Corn -1.126181e+01 -8.390528e+00
## Dairy 8.671072e+00 1.686077e+01
## FiberCrop 4.463900e+01 8.884673e+01
## Fruits -1.345682e+01 -1.252403e+00
## Legumes 3.119046e+01 5.275326e+01
## MiscCrop -1.899942e+01 2.004712e+01
## NutsSeeds -1.043873e+01 7.825964e+00
## OilCrop -9.771457e+00 -5.169447e+00
## OilPalm -2.190701e+01 -7.961891e+00
## OtherGrain -7.372650e+00 9.149471e-01
## OtherMeat_Fish -8.994994e+00 5.532174e+00
## Poultry 1.296310e+01 2.544894e+01
## Rice 5.613996e+00 7.795001e+00
## RootTuber -2.045679e+01 -1.043894e+01
## SheepGoat 5.507613e+00 5.932289e+01
## Soybean -1.366728e+01 -6.694962e+00
## SugarCrop 8.222544e+00 1.449386e+01
## Vegetables -1.871943e+01 -3.386461e+00
## Wheat -1.363664e+00 4.400104e-01
## NEC 1.100793e+00 6.554159e+00
## Pork -2.117692e+00 3.711815e+00
## calperg_food_w_calorie -2.637817e-05 2.286278e-07
## log(GDP_pcap_thous2015USD_FAO) -1.607937e-03 3.264120e-03
## year -1.865550e-06 2.005489e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74042 -0.04502 -0.02329 -0.00202 0.77545
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.586e-06 2.531e-08 62.677 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 1.745e-02 2.766e-03 6.309 3.56e-10 ***
## year 9.698e-08 3.664e-06 0.026 0.979
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1243 on 1715 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.7465, Adjusted R-squared: 0.746
## F-statistic: 1683 on 3 and 1715 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.536507e-06 1.635777e-06
## log(GDP_pcap_thous2015USD_FAO) 1.202662e-02 2.287755e-02
## year -7.089363e-06 7.283320e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.57371 -0.01846 -0.00530 0.00643 0.64664
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -9.869e-08 3.651e-08 -2.703 0.00694 **
## Feed_Kt 5.653e-06 1.102e-07 51.270 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 4.990e-03 1.755e-03 2.843 0.00453 **
## year -4.331e-06 2.304e-06 -1.880 0.06033 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07814 on 1714 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.8999, Adjusted R-squared: 0.8997
## F-statistic: 3854 on 4 and 1714 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -1.702932e-07 -2.708389e-08
## Feed_Kt 5.436508e-06 5.869004e-06
## log(GDP_pcap_thous2015USD_FAO) 1.547072e-03 8.432454e-03
## year -8.850310e-06 1.882577e-07
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.55564 -0.01788 -0.00468 0.00632 0.64650
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -1.167e-01 2.471e-02 -4.724 2.51e-06 ***
## Feed_Kt 5.888e-06 1.169e-07 50.364 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 4.180e-03 1.757e-03 2.380 0.0174 *
## year -3.593e-06 2.302e-06 -1.561 0.1187
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07781 on 1714 degrees of freedom
## (83 observations deleted due to missingness)
## Multiple R-squared: 0.9008, Adjusted R-squared: 0.9006
## F-statistic: 3891 on 4 and 1714 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -1.651813e-01 -6.825234e-02
## Feed_Kt 5.659116e-06 6.117747e-06
## log(GDP_pcap_thous2015USD_FAO) 7.346859e-04 7.626312e-03
## year -8.108598e-06 9.218464e-07
## png
## 2
plot_ly(comb_data_sel_8) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_8) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_8 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
GDP_pcap_thous2015USD_FAO < 40 ~ "30-40",
TRUE ~ ">= 40"),
GDP_group = factor(GDP_group, levels = c("< 1", "1-5", "5-10", "10-20", "20-30", "30-40", ">= 40")))) %>%
add_trace(x = ~GDP_group,
y = ~EJ_per_PKcal,
type = "box") %>%
layout(xaxis = list(title = "GDP category"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
Another test, using:
The fraction of total industry energy used in food processing is greater than 0.01
The fraction of total energy use that is in non-specified industry for each fuel is less than 0.8, or, if it is greater than that fraction, the total consumption of that fuel as a fraction of non-specified industry energy use is less than 0.1 (meaning that that fuel is not a big contributor to the non-specified industry energy use anyway so we don’t need to worry about it as much)
# get regions and years to exclude based on the fraction of fuel use criteria
country_years_excl_high_inonspec_fuel_2 <- IEA_ind_sectors_region_fuel %>%
filter(FLOW == "INONSPEC") %>%
group_by(iso, country_name, GCAM_region_ID, year) %>%
mutate(frac_fuel = value / sum(value)) %>%
filter(frac_sector > max_frac_INONSPEC_fuel & frac_fuel > max_frac_fuel_total_en) %>%
dplyr::select(iso, country_name, GCAM_region_ID, year) %>%
distinct()
# try what this looks like
comb_data_sel_9 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_high_inonspec_fuel_2) %>%
anti_join(country_years_excl_low_foodpro)
# plot energy used in food processing by fuel
ggplot(IEA_ind_sectors_region_fuel %>%
filter(FLOW == "FOODPRO") %>%
anti_join(country_years_excl_high_inonspec_fuel_2) %>%
anti_join(country_years_excl_low_foodpro),
aes(x = year, y = value, fill = fuel)) +
geom_col() +
facet_wrap(~country_name, scale = "free_y") +
scale_fill_manual(values = pal_sel, drop = TRUE, limits = force) +
labs(x = "", y = "EJ", title = "Food processing energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_by_country_fuel_hist_IEA_sel_9.png"), width = 35, height = 20)
Another test, using:
The fraction of total industry energy used in food processing is greater than 0.01
The fraction of total energy use that is in non-specified industry for each fuel is less than 0.8, or, if it is greater than that fraction, fraction of total energy use that is in non-specified industry is less than 0.5 (meaning that that fuel is not a big contributor to the non-specified industry energy use anyway so we don’t need to worry about it as much)
# try what this looks like
comb_data_sel_10 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0) %>%
anti_join(country_years_excl_high_inonspec_fuel %>%
inner_join(country_years_excl_high_inonspec)) %>%
anti_join(country_years_excl_low_foodpro)
# plot energy used in food processing by fuel
ggplot(IEA_ind_sectors_region_fuel %>%
filter(FLOW == "FOODPRO") %>%
anti_join(country_years_excl_high_inonspec_fuel %>%
inner_join(country_years_excl_high_inonspec)) %>%
anti_join(country_years_excl_low_foodpro),
aes(x = year, y = value, fill = fuel)) +
geom_col() +
facet_wrap(~country_name, scale = "free_y") +
scale_fill_manual(values = pal_sel, drop = TRUE, limits = force) +
labs(x = "", y = "EJ", title = "Food processing energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_by_country_fuel_hist_IEA_sel_10.png"), width = 35, height = 20)
Another test, using:
The fraction of total industry energy used in food processing is greater than 0.01
The fraction of total energy use that is in non-specified industry is less than 0.5
# plot energy used in food processing by fuel
ggplot(IEA_ind_sectors_region_fuel %>%
filter(FLOW == "FOODPRO") %>%
anti_join(country_years_excl_high_inonspec) %>%
anti_join(country_years_excl_low_foodpro),
aes(x = year, y = value, fill = fuel)) +
geom_col() +
facet_wrap(~country_name, scale = "free_y") +
scale_fill_manual(values = pal_sel, drop = TRUE, limits = force) +
labs(x = "", y = "EJ", title = "Food processing energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_by_country_fuel_hist_IEA_sel_5.png"), width = 35, height = 20)
plot_ly(comb_data_sel_6 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
GDP_pcap_thous2015USD_FAO < 40 ~ "30-40",
TRUE ~ ">= 40"),
GDP_group = factor(GDP_group, levels = c("< 1", "1-5", "5-10", "10-20", "20-30", "30-40", ">= 40")))) %>%
add_trace(x = ~GDP_group,
y = ~EJ_per_PKcal,
type = "box") %>%
layout(xaxis = list(title = "GDP category"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
Another test using:
(this shouldn’t be used to decide which regions to fill in data for, but was just me trying to select regions that seem to have reasonable data)
countries_sel_manual <- c("Albania", "Australia", "Austria", "Bulgaria", "Brazil",
"Botswana", "Belgium", "Belarus", "China", "Colombia", "Costa Rica",
"Croatia", "Estonia", "Denmark", "Czech Republic", "France", "Germany", "Greece",
"Japan", "Italy", "Ireland", "Hungary", "Korea, Republic of", "Mexico",
"Netherlands", "Norway", "Romania", "Russian Federation", "Portugal", "Poland",
"Thailand", "Taiwan", "Sweden", "Spain", "Turkey", "United Kingdom", "United States of America")
comb_data_sel_11 <- comb_data_sel_cats %>%
filter(!is.na(energy),
!is.na(MKcal),
energy > 0,
MKcal > 0,
country_name %in% countries_sel_manual,
year >= 1995)
calc_lin_model_food_en_use_production(comb_data_sel_11, "11")
##
## Call:
## lm(formula = energy ~ PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75697 -0.05100 -0.04126 0.01115 0.76149
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.054726 0.006258 8.745 <2e-16 ***
## PKcal 1.002302 0.022954 43.666 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1612 on 768 degrees of freedom
## Multiple R-squared: 0.7129, Adjusted R-squared: 0.7125
## F-statistic: 1907 on 1 and 768 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.81351 0.00215 0.01155 0.06211 0.78519
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.07699 0.02233 48.24 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1689 on 769 degrees of freedom
## Multiple R-squared: 0.7516, Adjusted R-squared: 0.7513
## F-statistic: 2327 on 1 and 769 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.75396 -0.05245 -0.03675 0.01418 0.76397
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.522e-02 5.525e-02 -0.819 0.413
## PKcal 1.007e+00 2.309e-02 43.636 <2e-16 ***
## calperg_food_w_calorie 5.730e-05 3.147e-05 1.821 0.069 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1609 on 767 degrees of freedom
## Multiple R-squared: 0.7141, Adjusted R-squared: 0.7134
## F-statistic: 957.9 on 2 and 767 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73768 -0.05190 -0.02534 0.00292 0.74193
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.070e-01 5.618e-02 -1.905 0.0572 .
## PKcal 1.022e+00 2.318e-02 44.067 < 2e-16 ***
## calperg_food_w_calorie 6.966e-05 3.175e-05 2.194 0.0285 *
## GDP_pcap_thous2015USD_FAO 1.798e-03 3.291e-04 5.462 6.42e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1602 on 740 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7249, Adjusted R-squared: 0.7238
## F-statistic: 649.9 on 3 and 740 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.72673 -0.06149 -0.02843 0.00226 0.73563
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.602e-01 5.773e-02 -2.774 0.00567 **
## PKcal 1.035e+00 2.341e-02 44.204 < 2e-16 ***
## calperg_food_w_calorie 6.274e-05 3.163e-05 1.984 0.04763 *
## log(GDP_pcap_thous2015USD_FAO) 3.820e-02 6.349e-03 6.016 2.8e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1596 on 740 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7271, Adjusted R-squared: 0.726
## F-statistic: 657.3 on 3 and 740 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + GDP_pcap_thous2015USD_calc,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74426 -0.05068 -0.02803 0.00628 0.73435
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -9.382e-02 5.637e-02 -1.664 0.0964 .
## PKcal 1.021e+00 2.339e-02 43.656 < 2e-16 ***
## calperg_food_w_calorie 6.737e-05 3.183e-05 2.117 0.0346 *
## GDP_pcap_thous2015USD_calc 1.145e-03 2.728e-04 4.196 3.04e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.161 on 745 degrees of freedom
## (21 observations deleted due to missingness)
## Multiple R-squared: 0.7205, Adjusted R-squared: 0.7194
## F-statistic: 640.2 on 3 and 745 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73003 -0.06017 -0.02833 0.00254 0.73257
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.052014 0.019044 -2.731 0.00646 **
## PKcal 1.029808 0.023325 44.151 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.038520 0.006359 6.057 2.2e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1599 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7257, Adjusted R-squared: 0.7249
## F-statistic: 980.1 on 2 and 741 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal:calperg_food_w_calorie +
## PKcal:log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.32421 -0.03082 -0.00566 0.00540 0.65769
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.709e-03 4.196e-03 1.122 0.262
## PKcal -8.072e-01 1.156e-01 -6.985 6.33e-12 ***
## PKcal:calperg_food_w_calorie 6.426e-04 6.981e-05 9.205 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.451e-01 1.485e-02 36.699 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09752 on 740 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.8981, Adjusted R-squared: 0.8977
## F-statistic: 2173 on 3 and 740 DF, p-value: < 2.2e-16
##
##
## Call:
## lm(formula = energy ~ PKcal + PKcal * calperg_food_w_calorie +
## PKcal * log(GDP_pcap_thous2015USD_FAO), data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.31430 -0.03681 -0.00936 0.02439 0.64402
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.817e-02 3.673e-02 1.856 0.0638 .
## PKcal -9.066e-01 1.229e-01 -7.379 4.30e-13 ***
## calperg_food_w_calorie -7.386e-07 2.030e-05 -0.036 0.9710
## log(GDP_pcap_thous2015USD_FAO) -2.312e-02 4.173e-03 -5.540 4.21e-08 ***
## PKcal:calperg_food_w_calorie 6.605e-04 7.338e-05 9.001 < 2e-16 ***
## PKcal:log(GDP_pcap_thous2015USD_FAO) 5.812e-01 1.601e-02 36.309 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09568 on 738 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9021, Adjusted R-squared: 0.9015
## F-statistic: 1361 on 5 and 738 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -0.0039309256 1.402775e-01
## PKcal -1.1478551730 -6.654322e-01
## calperg_food_w_calorie -0.0000405868 3.910957e-05
## log(GDP_pcap_thous2015USD_FAO) -0.0313096578 -1.492504e-02
## PKcal:calperg_food_w_calorie 0.0005164325 8.045525e-04
## PKcal:log(GDP_pcap_thous2015USD_FAO) 0.5497771579 6.126271e-01
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.72292 -0.06138 -0.02961 0.00855 0.72174
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -4.209e+00 2.038e+00 -2.066 0.0392 *
## PKcal 1.034e+00 2.336e-02 44.278 < 2e-16 ***
## calperg_food_w_calorie 7.785e-05 3.247e-05 2.398 0.0167 *
## log(GDP_pcap_thous2015USD_FAO) 3.620e-02 6.415e-03 5.644 2.37e-08 ***
## year 2.009e-03 1.011e-03 1.988 0.0472 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1592 on 739 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7286, Adjusted R-squared: 0.7271
## F-statistic: 495.9 on 4 and 739 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -8.209652e+00 -0.2085535192
## PKcal 9.884770e-01 1.0801977911
## calperg_food_w_calorie 1.411801e-05 0.0001415873
## log(GDP_pcap_thous2015USD_FAO) 2.360949e-02 0.0487967697
## year 2.480680e-05 0.0039931913
##
## Call:
## lm(formula = energy ~ PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year + country_name, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.41040 -0.01246 -0.00136 0.01112 0.32830
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -7.176e-01 1.111e+00 -0.646 0.518373
## PKcal 3.089e+00 1.261e-01 24.494 < 2e-16 ***
## calperg_food_w_calorie -1.003e-04 2.897e-05 -3.464 0.000565 ***
## log(GDP_pcap_thous2015USD_FAO) 2.442e-02 1.848e-02 1.321 0.186974
## year 4.079e-04 5.544e-04 0.736 0.462068
## country_nameAustralia 1.842e-02 5.487e-02 0.336 0.737182
## country_nameAustria -8.635e-03 5.658e-02 -0.153 0.878733
## country_nameBelarus -6.892e-05 1.762e-02 -0.004 0.996881
## country_nameBelgium -5.655e-03 5.402e-02 -0.105 0.916667
## country_nameBotswana 3.441e-02 2.515e-02 1.368 0.171730
## country_nameBrazil 8.822e-02 3.526e-02 2.502 0.012587 *
## country_nameBulgaria 3.661e-02 2.627e-02 1.394 0.163876
## country_nameChina -3.367e+00 1.907e-01 -17.660 < 2e-16 ***
## country_nameColombia -4.955e-02 2.252e-02 -2.201 0.028089 *
## country_nameCosta Rica 3.597e-02 3.170e-02 1.135 0.256927
## country_nameCroatia 1.958e-03 3.109e-02 0.063 0.949809
## country_nameCzech Republic 1.241e-02 3.903e-02 0.318 0.750639
## country_nameDenmark -1.715e-02 5.768e-02 -0.297 0.766307
## country_nameEstonia -5.756e-03 3.380e-02 -0.170 0.864845
## country_nameFrance -9.954e-02 5.016e-02 -1.984 0.047602 *
## country_nameGermany -1.709e-01 4.814e-02 -3.549 0.000412 ***
## country_nameGreece -4.653e-02 3.996e-02 -1.164 0.244692
## country_nameHungary 1.485e-02 3.391e-02 0.438 0.661628
## country_nameIreland -2.440e-02 5.501e-02 -0.444 0.657492
## country_nameItaly -1.761e-01 4.721e-02 -3.729 0.000208 ***
## country_nameJapan -1.940e-01 4.713e-02 -4.116 4.31e-05 ***
## country_nameKorea, Republic of -1.135e-01 4.135e-02 -2.744 0.006220 **
## country_nameMexico -2.783e-01 3.396e-02 -8.196 1.17e-15 ***
## country_nameNetherlands -1.156e-02 5.280e-02 -0.219 0.826755
## country_nameNorway -4.132e-02 6.313e-02 -0.655 0.512943
## country_namePoland -5.453e-02 2.895e-02 -1.884 0.060032 .
## country_namePortugal -4.571e-02 3.894e-02 -1.174 0.240917
## country_nameRomania -4.900e-02 2.254e-02 -2.174 0.030025 *
## country_nameRussian Federation -1.774e-01 2.892e-02 -6.134 1.43e-09 ***
## country_nameSpain -9.597e-02 4.210e-02 -2.280 0.022914 *
## country_nameSweden -5.142e-02 5.438e-02 -0.946 0.344684
## country_nameThailand 8.074e-02 2.922e-02 2.763 0.005871 **
## country_nameTurkey -2.388e-01 2.600e-02 -9.182 < 2e-16 ***
## country_nameUnited Kingdom -1.449e-01 5.020e-02 -2.885 0.004030 **
## country_nameUnited States of America -3.245e-01 6.249e-02 -5.193 2.71e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.05124 on 704 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9732, Adjusted R-squared: 0.9717
## F-statistic: 656.3 on 39 and 704 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -2.8979171918 1.462728e+00
## PKcal 2.8410413322 3.336172e+00
## calperg_food_w_calorie -0.0001572179 -4.346201e-05
## log(GDP_pcap_thous2015USD_FAO) -0.0118756677 6.070677e-02
## year -0.0006804844 1.496349e-03
## country_nameAustralia -0.0893149813 1.261601e-01
## country_nameAustria -0.1197161921 1.024452e-01
## country_nameBelarus -0.0346717493 3.453391e-02
## country_nameBelgium -0.1117225274 1.004130e-01
## country_nameBotswana -0.0149728944 8.379386e-02
## country_nameBrazil 0.0189837174 1.574551e-01
## country_nameBulgaria -0.0149666679 8.818580e-02
## country_nameChina -3.7417594928 -2.993018e+00
## country_nameColombia -0.0937663723 -5.342526e-03
## country_nameCosta Rica -0.0262740498 9.821653e-02
## country_nameCroatia -0.0590782520 6.299335e-02
## country_nameCzech Republic -0.0642201075 8.903688e-02
## country_nameDenmark -0.1303876087 9.609022e-02
## country_nameEstonia -0.0721201495 6.060907e-02
## country_nameFrance -0.1980301807 -1.055192e-03
## country_nameGermany -0.2653756312 -7.635323e-02
## country_nameGreece -0.1249815972 3.192927e-02
## country_nameHungary -0.0517345605 8.143272e-02
## country_nameIreland -0.1323972193 8.359846e-02
## country_nameItaly -0.2687511659 -8.336224e-02
## country_nameJapan -0.2865053795 -1.014526e-01
## country_nameKorea, Republic of -0.1946802203 -3.229381e-02
## country_nameMexico -0.3450248162 -2.116725e-01
## country_nameNetherlands -0.1152284256 9.210686e-02
## country_nameNorway -0.1652671979 8.261962e-02
## country_namePoland -0.1113629043 2.308639e-03
## country_namePortugal -0.1221704430 3.075274e-02
## country_nameRomania -0.0932493124 -4.751661e-03
## country_nameRussian Federation -0.2341458335 -1.205941e-01
## country_nameSpain -0.1786212691 -1.332469e-02
## country_nameSweden -0.1581972064 5.534879e-02
## country_nameThailand 0.0233755365 1.381125e-01
## country_nameTurkey -0.2898286637 -1.877159e-01
## country_nameUnited Kingdom -0.2434261430 -4.628797e-02
## country_nameUnited States of America -0.4472207936 -2.018460e-01
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47441 -0.01926 -0.00110 0.01574 0.42694
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.180e+00 1.039e+00 1.136 0.2564
## staples -6.836e-01 4.647e-02 -14.711 <2e-16 ***
## nonstaples_animal -2.629e-01 3.222e-01 -0.816 0.4149
## nonstaples_other 6.813e+00 2.559e-01 26.618 <2e-16 ***
## calperg_food_w_calorie 3.897e-05 1.607e-05 2.425 0.0155 *
## log(GDP_pcap_thous2015USD_FAO) -3.912e-03 3.523e-03 -1.111 0.2671
## year -6.154e-04 5.154e-04 -1.194 0.2329
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07838 on 737 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9344, Adjusted R-squared: 0.9339
## F-statistic: 1750 on 6 and 737 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -8.593188e-01 3.219282e+00
## staples -7.748687e-01 -5.924002e-01
## nonstaples_animal -8.954322e-01 3.697031e-01
## nonstaples_other 6.310473e+00 7.315429e+00
## calperg_food_w_calorie 7.421255e-06 7.052413e-05
## log(GDP_pcap_thous2015USD_FAO) -1.082884e-02 3.004060e-03
## year -1.627115e-03 3.963980e-04
##
## Call:
## lm(formula = energy ~ staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + GDP_pcap_thous2015USD_FAO + year,
## data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47164 -0.01950 -0.00154 0.01512 0.42907
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.447e+00 1.031e+00 1.404 0.1607
## staples -6.554e-01 4.459e-02 -14.699 <2e-16 ***
## nonstaples_animal -4.160e-01 3.159e-01 -1.317 0.1883
## nonstaples_other 6.893e+00 2.538e-01 27.156 <2e-16 ***
## calperg_food_w_calorie 3.745e-05 1.604e-05 2.335 0.0198 *
## GDP_pcap_thous2015USD_FAO 5.514e-05 1.746e-04 0.316 0.7522
## year -7.533e-04 5.109e-04 -1.475 0.1408
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07844 on 737 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9343, Adjusted R-squared: 0.9338
## F-statistic: 1747 on 6 and 737 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## (Intercept) -5.763677e-01 3.471078e+00
## staples -7.429113e-01 -5.678508e-01
## nonstaples_animal -1.036094e+00 2.041808e-01
## nonstaples_other 6.394344e+00 7.390916e+00
## calperg_food_w_calorie 5.965633e-06 6.894297e-05
## GDP_pcap_thous2015USD_FAO -2.876260e-04 3.979019e-04
## year -1.756265e-03 2.496392e-04
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other +
## calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47788 -0.01917 -0.00232 0.01612 0.42523
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -6.866e-01 4.641e-02 -14.796 < 2e-16 ***
## nonstaples_animal -1.733e-01 3.125e-01 -0.555 0.57938
## nonstaples_other 6.738e+00 2.472e-01 27.252 < 2e-16 ***
## calperg_food_w_calorie 4.404e-05 1.544e-05 2.851 0.00447 **
## log(GDP_pcap_thous2015USD_FAO) -4.679e-03 3.459e-03 -1.353 0.17650
## year -3.016e-05 1.415e-05 -2.131 0.03338 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07839 on 738 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9486, Adjusted R-squared: 0.9482
## F-statistic: 2272 on 6 and 738 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## staples -7.777478e-01 -5.955407e-01
## nonstaples_animal -7.867286e-01 4.401667e-01
## nonstaples_other 6.252153e+00 7.222886e+00
## calperg_food_w_calorie 1.371713e-05 7.435581e-05
## log(GDP_pcap_thous2015USD_FAO) -1.146871e-02 2.110635e-03
## year -5.793063e-05 -2.380711e-06
##
## Call:
## lm(formula = energy ~ 0 + PKcal + calperg_food_w_calorie + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.72701 -0.06123 -0.02836 0.00173 0.73601
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.034e+00 2.341e-02 44.182 < 2e-16 ***
## calperg_food_w_calorie 6.042e-05 3.142e-05 1.923 0.05485 .
## log(GDP_pcap_thous2015USD_FAO) 3.817e-02 6.358e-03 6.003 3.03e-09 ***
## year -7.780e-05 2.864e-05 -2.717 0.00675 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1596 on 740 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7866, Adjusted R-squared: 0.7854
## F-statistic: 681.8 on 4 and 740 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 9.884254e-01 1.080348e+00
## calperg_food_w_calorie -1.259743e-06 1.220973e-04
## log(GDP_pcap_thous2015USD_FAO) 2.568543e-02 5.064928e-02
## year -1.340176e-04 -2.157651e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.72304 -0.05869 -0.03225 0.00629 0.70397
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.071e+00 2.449e-02 43.729 < 2e-16 ***
## staples_frac -3.965e-01 8.770e-02 -4.522 7.14e-06 ***
## calperg_food_w_calorie 7.346e-05 3.115e-05 2.358 0.0186 *
## log(GDP_pcap_thous2015USD_FAO) 8.464e-03 9.085e-03 0.932 0.3519
## year 2.565e-05 3.637e-05 0.705 0.4808
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1575 on 739 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7923, Adjusted R-squared: 0.7909
## F-statistic: 563.9 on 5 and 739 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.022999e+00 1.119170e+00
## staples_frac -5.686978e-01 -2.243704e-01
## calperg_food_w_calorie 1.231037e-05 1.346033e-04
## log(GDP_pcap_thous2015USD_FAO) -9.372500e-03 2.629985e-02
## year -4.574139e-05 9.704809e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + nonstaples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.72353 -0.05899 -0.03180 0.00690 0.70620
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.070e+00 2.450e-02 43.678 < 2e-16 ***
## nonstaples_frac 3.850e-01 8.736e-02 4.408 1.20e-05 ***
## calperg_food_w_calorie 7.148e-05 3.114e-05 2.296 0.022 *
## log(GDP_pcap_thous2015USD_FAO) 9.505e-03 9.040e-03 1.051 0.293
## year -1.682e-04 3.495e-05 -4.814 1.79e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1576 on 739 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.792, Adjusted R-squared: 0.7906
## F-statistic: 562.9 on 5 and 739 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 1.021930e+00 1.118119e+00
## nonstaples_frac 2.135411e-01 5.565290e-01
## calperg_food_w_calorie 1.036022e-05 1.326077e-04
## log(GDP_pcap_thous2015USD_FAO) -8.243272e-03 2.725273e-02
## year -2.368453e-04 -9.963457e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal * staples_frac + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47055 -0.03208 -0.00848 0.02180 0.51308
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 3.711e+00 6.509e-02 57.012 < 2e-16 ***
## staples_frac 4.069e-02 4.925e-02 0.826 0.40888
## calperg_food_w_calorie 4.960e-05 1.709e-05 2.902 0.00382 **
## log(GDP_pcap_thous2015USD_FAO) -1.345e-02 5.011e-03 -2.684 0.00745 **
## year -2.987e-05 1.999e-05 -1.494 0.13560
## PKcal:staples_frac -4.626e+00 1.116e-01 -41.451 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08641 on 738 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9376, Adjusted R-squared: 0.9371
## F-statistic: 1848 on 6 and 738 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal 3.583426e+00 3.839013e+00
## staples_frac -5.598523e-02 1.373738e-01
## calperg_food_w_calorie 1.604452e-05 8.316307e-05
## log(GDP_pcap_thous2015USD_FAO) -2.328744e-02 -3.610550e-03
## year -6.911929e-05 9.380397e-06
## PKcal:staples_frac -4.844832e+00 -4.406663e+00
##
## Call:
## lm(formula = energy ~ 0 + Beef + Corn + Dairy + FiberCrop + Fruits +
## Legumes + MiscCrop + NutsSeeds + OilCrop + OilPalm + OtherGrain +
## OtherMeat_Fish + Poultry + Rice + RootTuber + SheepGoat +
## Soybean + SugarCrop + Vegetables + Wheat + NEC + Pork + calperg_food_w_calorie +
## log(GDP_pcap_thous2015USD_FAO) + year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.070926 -0.008264 -0.001539 0.008832 0.105028
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Beef 3.116e+01 6.664e+00 4.676 5.52e-06 ***
## Corn -8.919e+00 1.125e+00 -7.931 1.78e-13 ***
## Dairy 1.724e+01 2.925e+00 5.892 1.70e-08 ***
## FiberCrop 6.921e+01 1.662e+01 4.164 4.74e-05 ***
## Fruits 3.839e+00 4.944e+00 0.776 0.438449
## Legumes 2.423e+01 8.336e+00 2.906 0.004087 **
## MiscCrop -3.441e+01 1.311e+01 -2.625 0.009378 **
## NutsSeeds -1.124e+01 8.627e+00 -1.302 0.194345
## OilCrop -4.515e+00 1.593e+00 -2.834 0.005088 **
## OilPalm -3.664e+01 4.409e+00 -8.311 1.74e-14 ***
## OtherGrain -6.544e-01 2.884e+00 -0.227 0.820710
## OtherMeat_Fish 2.151e+00 5.768e+00 0.373 0.709658
## Poultry 2.608e+01 5.043e+00 5.171 5.85e-07 ***
## Rice 8.408e+00 9.182e-01 9.157 < 2e-16 ***
## RootTuber -2.255e+01 4.904e+00 -4.599 7.72e-06 ***
## SheepGoat -1.817e+01 1.959e+01 -0.927 0.354863
## Soybean -1.642e+01 3.408e+00 -4.818 2.95e-06 ***
## SugarCrop 9.564e+00 2.444e+00 3.914 0.000126 ***
## Vegetables -6.740e+00 6.498e+00 -1.037 0.300927
## Wheat -3.504e+00 1.067e+00 -3.284 0.001217 **
## NEC 1.176e+00 1.826e+00 0.644 0.520338
## Pork 2.052e+00 1.989e+00 1.032 0.303368
## calperg_food_w_calorie -1.593e-06 1.263e-05 -0.126 0.899799
## log(GDP_pcap_thous2015USD_FAO) 2.501e-04 2.837e-03 0.088 0.929840
## year 2.347e-06 1.033e-05 0.227 0.820564
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.02301 on 191 degrees of freedom
## (554 observations deleted due to missingness)
## Multiple R-squared: 0.9971, Adjusted R-squared: 0.9967
## F-statistic: 2636 on 25 and 191 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Beef 1.801544e+01 4.430345e+01
## Corn -1.113696e+01 -6.700577e+00
## Dairy 1.146586e+01 2.300646e+01
## FiberCrop 3.642424e+01 1.020010e+02
## Fruits -5.912901e+00 1.359006e+01
## Legumes 7.786199e+00 4.067134e+01
## MiscCrop -6.026618e+01 -8.549025e+00
## NutsSeeds -2.825358e+01 5.780825e+00
## OilCrop -7.657835e+00 -1.372929e+00
## OilPalm -4.534112e+01 -2.794682e+01
## OtherGrain -6.342066e+00 5.033261e+00
## OtherMeat_Fish -9.227036e+00 1.352876e+01
## Poultry 1.612944e+01 3.602229e+01
## Rice 6.597219e+00 1.021959e+01
## RootTuber -3.222522e+01 -1.287975e+01
## SheepGoat -5.681007e+01 2.047206e+01
## Soybean -2.313793e+01 -9.695385e+00
## SugarCrop 4.743759e+00 1.438438e+01
## Vegetables -1.955607e+01 6.076612e+00
## Wheat -5.609283e+00 -1.399656e+00
## NEC -2.425474e+00 4.777154e+00
## Pork -1.870123e+00 5.974588e+00
## calperg_food_w_calorie -2.651259e-05 2.332679e-05
## log(GDP_pcap_thous2015USD_FAO) -5.345974e-03 5.846228e-03
## year -1.803193e-05 2.272518e-05
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68138 -0.06477 -0.03516 -0.00259 0.74920
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.542e-06 3.635e-08 42.408 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 3.611e-02 6.545e-03 5.517 4.76e-08 ***
## year -1.757e-05 9.738e-06 -1.804 0.0716 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1645 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7728, Adjusted R-squared: 0.7719
## F-statistic: 840.3 on 3 and 741 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt 1.470275e-06 1.613006e-06
## log(GDP_pcap_thous2015USD_FAO) 2.326141e-02 4.895883e-02
## year -3.668436e-05 1.548824e-06
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.57591 -0.03340 -0.01471 0.00205 0.63224
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -2.135e-07 6.208e-08 -3.439 0.000617 ***
## Feed_Kt 6.025e-06 1.963e-07 30.685 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 4.106e-03 4.468e-03 0.919 0.358360
## year 8.256e-07 6.492e-06 0.127 0.898841
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1092 on 740 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9, Adjusted R-squared: 0.8995
## F-statistic: 1666 on 4 and 740 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## Food_Kt -3.353602e-07 -9.160842e-08
## Feed_Kt 5.639143e-06 6.410040e-06
## log(GDP_pcap_thous2015USD_FAO) -4.665181e-03 1.287816e-02
## year -1.191903e-05 1.357015e-05
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt + log(GDP_pcap_thous2015USD_FAO) +
## year, data = input_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.53834 -0.03590 -0.01342 0.00234 0.62963
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -2.601e-01 4.600e-02 -5.654 2.24e-08 ***
## Feed_Kt 6.573e-06 2.203e-07 29.838 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 5.363e-06 4.482e-03 0.001 0.999
## year 5.910e-06 6.500e-06 0.909 0.363
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1078 on 740 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9026, Adjusted R-squared: 0.9021
## F-statistic: 1715 on 4 and 740 DF, p-value: < 2.2e-16
##
## 2.5 % 97.5 %
## PKcal -3.503767e-01 -1.697711e-01
## Feed_Kt 6.140488e-06 7.005407e-06
## log(GDP_pcap_thous2015USD_FAO) -8.794101e-03 8.804827e-03
## year -6.849779e-06 1.866972e-05
## png
## 2
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0("year = ", year)) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs food production")
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "lines+markers",
color = ~country_name) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_11 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
GDP_pcap_thous2015USD_FAO < 40 ~ "30-40",
TRUE ~ ">= 40"))) %>%
add_trace(x = ~year,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
text = ~country_name,
color = ~GDP_group) %>%
layout(xaxis = list(title = "year"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_11 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
GDP_pcap_thous2015USD_FAO < 40 ~ "30-40",
TRUE ~ ">= 40"),
GDP_group = factor(GDP_group, levels = c("< 1", "1-5", "5-10", "10-20", "20-30", "30-40", ">= 40")))) %>%
add_trace(x = ~GDP_group,
y = ~EJ_per_PKcal,
type = "box") %>%
layout(xaxis = list(title = "GDP category"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP")
plot_ly(comb_data_sel_11 %>% filter(year == 2015)) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP, 2015")
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
plot_ly(comb_data_sel_11 %>% mutate(GDP_times_nonstaples_frac = GDP_pcap_thous2015USD_FAO*nonstaples_frac)) %>%
add_trace(x = ~GDP_times_nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015) * nonstaples fraction"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
plot_ly(comb_data_sel_11 %>%
mutate(GDP_group = case_when(GDP_pcap_thous2015USD_FAO < 1 ~ "< 1",
GDP_pcap_thous2015USD_FAO < 5 ~ "1-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 30 ~ "20-30",
GDP_pcap_thous2015USD_FAO < 40 ~ "30-40",
TRUE ~ ">= 40"))) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~GDP_pcap_thous2015USD_FAO,
text = ~GDP_pcap_thous2015USD_FAO) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
print(summary(lm(EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO, comb_data_sel_11)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.3754 -0.6866 -0.2848 0.4839 3.6027
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.448274 0.057872 25.03 <2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.023107 0.001989 11.62 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9763 on 742 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.1539, Adjusted R-squared: 0.1527
## F-statistic: 134.9 on 1 and 742 DF, p-value: < 2.2e-16
print(summary(lm(EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO + staples_frac, comb_data_sel_11)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ GDP_pcap_thous2015USD_FAO + staples_frac,
## data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5019 -0.6845 -0.2739 0.4550 3.7501
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.637821 0.219885 11.996 < 2e-16 ***
## GDP_pcap_thous2015USD_FAO 0.013632 0.002582 5.280 1.70e-07 ***
## staples_frac -2.533656 0.452489 -5.599 3.03e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9569 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.1882, Adjusted R-squared: 0.186
## F-statistic: 85.9 on 2 and 741 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ log(staples_frac), comb_data_sel_11))
##
## Call:
## lm(formula = EJ_per_PKcal ~ log(staples_frac), data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6846 -0.7089 -0.2618 0.4330 3.7310
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3763 0.1386 2.715 0.00678 **
## log(staples_frac) -1.5801 0.1348 -11.718 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9726 on 768 degrees of freedom
## Multiple R-squared: 0.1517, Adjusted R-squared: 0.1506
## F-statistic: 137.3 on 1 and 768 DF, p-value: < 2.2e-16
lm_to_plot <- lm(EJ_per_PKcal ~ nonstaples_frac, comb_data_sel_11)
lm_to_plot_summary <- summary(lm_to_plot)
print(lm_to_plot_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ nonstaples_frac, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6561 -0.7083 -0.2485 0.4153 3.7280
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.5134 0.2169 -2.368 0.0182 *
## nonstaples_frac 3.9868 0.3467 11.500 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9753 on 768 degrees of freedom
## Multiple R-squared: 0.1469, Adjusted R-squared: 0.1458
## F-statistic: 132.3 on 1 and 768 DF, p-value: < 2.2e-16
lm_to_plot2 <- lm(EJ_per_PKcal ~ exp(nonstaples_frac), comb_data_sel_11)
lm_to_plot2_summary <- summary(lm_to_plot)
print(lm_to_plot2_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ nonstaples_frac, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.6561 -0.7083 -0.2485 0.4153 3.7280
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.5134 0.2169 -2.368 0.0182 *
## nonstaples_frac 3.9868 0.3467 11.500 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9753 on 768 degrees of freedom
## Multiple R-squared: 0.1469, Adjusted R-squared: 0.1458
## F-statistic: 132.3 on 1 and 768 DF, p-value: < 2.2e-16
print(summary(lm(EJ_per_PKcal ~ exp(nonstaples_frac) + GDP_pcap_thous2015USD_FAO, comb_data_sel_11)))
##
## Call:
## lm(formula = EJ_per_PKcal ~ exp(nonstaples_frac) + GDP_pcap_thous2015USD_FAO,
## data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5398 -0.6806 -0.2742 0.4623 3.7530
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.988067 0.436694 -2.263 0.0239 *
## exp(nonstaples_frac) 1.429507 0.254058 5.627 2.61e-08 ***
## GDP_pcap_thous2015USD_FAO 0.013306 0.002614 5.090 4.55e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9567 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.1885, Adjusted R-squared: 0.1863
## F-statistic: 86.08 on 2 and 741 DF, p-value: < 2.2e-16
# get key values from the model to plot
pval <- lm_to_plot_summary$coef[2,4]
Rsq <- lm_to_plot_summary$adj.r.squared
slope <- lm_to_plot_summary$coef[[2]]
# plot
x_for_lin_reg_plot <- c(0,1)
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
# get key values from the model to plot
pval <- lm_to_plot2_summary$coef[2,4]
Rsq <- lm_to_plot2_summary$adj.r.squared
slope <- lm_to_plot2_summary$coef[[2]]
# plot
x_for_lin_reg_plot <- c(0,1)
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot2, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
lm_to_plot3 <- lm(energy ~ 0 + nonstaples_other, comb_data_sel_11)
lm_to_plot3_summary <- summary(lm_to_plot3)
print(lm_to_plot3_summary)
##
## Call:
## lm(formula = energy ~ 0 + nonstaples_other, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.55864 -0.00573 0.00232 0.01725 0.51813
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_other 5.09747 0.05326 95.71 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09432 on 769 degrees of freedom
## Multiple R-squared: 0.9226, Adjusted R-squared: 0.9225
## F-statistic: 9161 on 1 and 769 DF, p-value: < 2.2e-16
lm_to_plot4 <- lm(energy ~ 0 + PKcal, comb_data_sel_11)
lm_to_plot4_summary <- summary(lm_to_plot4)
print(lm_to_plot4_summary)
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.81351 0.00215 0.01155 0.06211 0.78519
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.07699 0.02233 48.24 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1689 on 769 degrees of freedom
## Multiple R-squared: 0.7516, Adjusted R-squared: 0.7513
## F-statistic: 2327 on 1 and 769 DF, p-value: < 2.2e-16
# get key values from the model to plot
pval <- lm_to_plot3_summary$coef[1,4]
Rsq <- lm_to_plot3_summary$adj.r.squared
slope <- lm_to_plot3_summary$coef[[1]]
# plot
x_for_lin_reg_plot <- c(min(comb_data_sel_11$nonstaples_other), max(comb_data_sel_11$nonstaples_other))
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~nonstaples_other,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot3, data.frame(nonstaples_other = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples production (PKcal)"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs non-meat nonstaples production")
# get key values from the model to plot
pval <- lm_to_plot4_summary$coef[1,4]
Rsq <- lm_to_plot4_summary$adj.r.squared
slope <- lm_to_plot4_summary$coef[[1]]
# plot
x_for_lin_reg_plot <- c(min(comb_data_sel_11$PKcal), max(comb_data_sel_11$PKcal))
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot4, data.frame(PKcal = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Food production (PKcal)"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs total food production")
# try 2015 only
lm_to_plot5 <- lm(energy ~ 0 + nonstaples_other, comb_data_sel_11 %>% filter(year == 2015))
lm_to_plot5_summary <- summary(lm_to_plot5)
print(lm_to_plot5_summary)
##
## Call:
## lm(formula = energy ~ 0 + nonstaples_other, data = comb_data_sel_11 %>%
## filter(year == 2015))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.23403 -0.00755 0.00538 0.01917 0.45916
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_other 4.5097 0.2245 20.09 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1097 on 36 degrees of freedom
## Multiple R-squared: 0.9181, Adjusted R-squared: 0.9158
## F-statistic: 403.5 on 1 and 36 DF, p-value: < 2.2e-16
lm_to_plot6 <- lm(energy ~ 0 + PKcal, comb_data_sel_11 %>% filter(year == 2015))
lm_to_plot6_summary <- summary(lm_to_plot6)
print(lm_to_plot6_summary)
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = comb_data_sel_11 %>%
## filter(year == 2015))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.29050 0.00200 0.01259 0.04273 0.64908
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.15544 0.09311 12.41 1.44e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1669 on 36 degrees of freedom
## Multiple R-squared: 0.8105, Adjusted R-squared: 0.8053
## F-statistic: 154 on 1 and 36 DF, p-value: 1.444e-14
# get key values from the model to plot
pval <- lm_to_plot5_summary$coef[1,4]
Rsq <- lm_to_plot5_summary$adj.r.squared
slope <- lm_to_plot5_summary$coef[[1]]
# plot
x_for_lin_reg_plot <- c(min(comb_data_sel_11$nonstaples_other), max(comb_data_sel_11$nonstaples_other))
plot_ly(comb_data_sel_11 %>% filter(year == 2015)) %>%
add_trace(x = ~nonstaples_other,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot5, data.frame(nonstaples_other = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples production (PKcal)"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs non-meat nonstaples production, 2015")
# get key values from the model to plot
pval <- lm_to_plot6_summary$coef[1,4]
Rsq <- lm_to_plot6_summary$adj.r.squared
slope <- lm_to_plot6_summary$coef[[1]]
# plot
x_for_lin_reg_plot <- c(min(comb_data_sel_11$PKcal), max(comb_data_sel_11$PKcal))
plot_ly(comb_data_sel_11 %>% filter(year == 2015)) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot6, data.frame(PKcal = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
line = list(dash = ifelse(pval <= 0.05, "solid", "dash")),
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Food production (PKcal)"),
yaxis = list(title = "EJ"),
title = "Food processing energy use vs total food production, 2015")
summary(lm(energy ~ 0 + staples + nonstaples_animal + nonstaples_other, comb_data_sel_11))
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_animal + nonstaples_other,
## data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49528 -0.01740 -0.00085 0.01341 0.42496
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -0.67050 0.04038 -16.61 <2e-16 ***
## nonstaples_animal -0.29333 0.29338 -1.00 0.318
## nonstaples_other 6.82161 0.23799 28.66 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.07773 on 767 degrees of freedom
## Multiple R-squared: 0.9475, Adjusted R-squared: 0.9473
## F-statistic: 4617 on 3 and 767 DF, p-value: < 2.2e-16
With that data, looking at production and including animal feed.
print(summary(lm(energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO), comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO),
## data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68620 -0.06659 -0.04270 -0.00925 0.76410
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.522e-06 3.466e-08 43.90 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.496e-02 2.160e-03 11.55 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1648 on 742 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7718, Adjusted R-squared: 0.7712
## F-statistic: 1255 on 2 and 742 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + PKcal + log(GDP_pcap_thous2015USD_FAO), comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + PKcal + log(GDP_pcap_thous2015USD_FAO),
## data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.73515 -0.05990 -0.03908 -0.00724 0.72536
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.009411 0.022193 45.48 <2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 0.022137 0.002121 10.44 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1606 on 742 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7834, Adjusted R-squared: 0.7828
## F-statistic: 1342 on 2 and 742 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) + calperg_food_w_calorie, comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## calperg_food_w_calorie, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.68492 -0.06679 -0.03927 -0.00866 0.76033
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt 1.526e-06 3.578e-08 42.663 < 2e-16 ***
## log(GDP_pcap_thous2015USD_FAO) 2.816e-02 6.270e-03 4.491 8.2e-06 ***
## calperg_food_w_calorie -5.803e-06 1.068e-05 -0.543 0.587
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1649 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.7719, Adjusted R-squared: 0.771
## F-statistic: 836 on 3 and 741 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) + Feed_Kt, comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + log(GDP_pcap_thous2015USD_FAO) +
## Feed_Kt, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.57555 -0.03314 -0.01468 0.00242 0.63263
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -2.119e-07 6.074e-08 -3.488 0.000515 ***
## log(GDP_pcap_thous2015USD_FAO) 4.638e-03 1.575e-03 2.944 0.003342 **
## Feed_Kt 6.022e-06 1.954e-07 30.825 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1092 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9, Adjusted R-squared: 0.8996
## F-statistic: 2224 on 3 and 741 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + PKcal + log(GDP_pcap_thous2015USD_FAO) + Feed_Kt, comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + PKcal + log(GDP_pcap_thous2015USD_FAO) +
## Feed_Kt, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.53718 -0.03379 -0.01311 0.00412 0.63238
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -2.491e-01 4.439e-02 -5.612 2.82e-08 ***
## log(GDP_pcap_thous2015USD_FAO) 3.830e-03 1.548e-03 2.474 0.0136 *
## Feed_Kt 6.540e-06 2.173e-07 30.099 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1078 on 741 degrees of freedom
## (26 observations deleted due to missingness)
## Multiple R-squared: 0.9025, Adjusted R-squared: 0.9021
## F-statistic: 2287 on 3 and 741 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + PKcal + Feed_Kt, comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.54409 -0.02604 -0.00277 0.01147 0.63564
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -2.788e-01 4.204e-02 -6.63 6.31e-11 ***
## Feed_Kt 6.745e-06 1.971e-07 34.22 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1064 on 768 degrees of freedom
## Multiple R-squared: 0.9016, Adjusted R-squared: 0.9013
## F-statistic: 3519 on 2 and 768 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + Food_Kt + Feed_Kt, comb_data_sel_11)))
##
## Call:
## lm(formula = energy ~ 0 + Food_Kt + Feed_Kt, data = comb_data_sel_11)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.58664 -0.02402 -0.00235 0.01213 0.63615
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Kt -2.631e-07 5.734e-08 -4.588 5.22e-06 ***
## Feed_Kt 6.257e-06 1.753e-07 35.688 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1079 on 768 degrees of freedom
## Multiple R-squared: 0.8987, Adjusted R-squared: 0.8985
## F-statistic: 3408 on 2 and 768 DF, p-value: < 2.2e-16
print(summary(lm(energy ~ 0 + Food_Feed_Kt, comb_data_sel_11 %>% mutate(Food_Feed_Kt = Food_Kt + Feed_Kt))))
##
## Call:
## lm(formula = energy ~ 0 + Food_Feed_Kt, data = comb_data_sel_11 %>%
## mutate(Food_Feed_Kt = Food_Kt + Feed_Kt))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.78112 0.00159 0.00783 0.05042 0.73693
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## Food_Feed_Kt 1.296e-06 2.393e-08 54.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1545 on 769 degrees of freedom
## Multiple R-squared: 0.7922, Adjusted R-squared: 0.792
## F-statistic: 2932 on 1 and 769 DF, p-value: < 2.2e-16
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~Food_Kt,
y = ~Feed_Kt,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "Food (Kt)"),
yaxis = list(title = "Feed (Kt)"),
title = "Feed vs food production")
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~PKcal,
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "PKcal"),
yaxis = list(title = "EJ"),
title = "Energy vs food demand")
plot_ly(comb_data_sel_11) %>%
add_trace(x = ~(Feed_Kt + Food_Kt),
y = ~energy,
type = "scatter",
mode = "markers",
color = ~country_name) %>%
layout(xaxis = list(title = "Kt"),
yaxis = list(title = "EJ"),
title = "Energy vs feed and food production")
Trying to come up with something that is rigorous and replicable, but also incorporates only results that seem reasonable.
IEA_ind_sectors_region_total_en_frac_wider <- IEA_ind_sectors_region_total_en %>%
dplyr::select(-value) %>%
pivot_wider(names_from = FLOW, values_from = frac)
# get regions and years to include - only where fraction in food processing is greater than 1% and fraction in non-specified is less than 50% and year is beyond 1990
country_years_incl <- IEA_ind_sectors_region_total_en_frac_wider %>%
filter(year >= 1990 & INONSPEC < 0.5 & (!is.na(FOODPRO) & FOODPRO > 0.01)) %>%
dplyr::select(iso, country_name, GCAM_region_ID, year)
ggplot(IEA_ind_sectors_region_fuel %>% filter(FLOW == "FOODPRO") %>% right_join(country_years_incl),
aes(x = year, y = value, fill = fuel)) +
geom_col() +
facet_wrap(~country_name, scale = "free_y") +
scale_fill_manual(values = pal_sel, drop = TRUE, limits = force) +
labs(x = "", y = "EJ", title = "Food processing energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_by_country_fuel_hist_IEA_sel_12.png"), width = 35, height = 20)
# filter the food and energy data
comb_data_sel_12 <- comb_data_sel_cats %>%
right_join(country_years_incl) %>%
filter(!is.na(MKcal),
MKcal > 0)
# plot the EJ per PKcal coefficient as a function of GDP per capita for these data
plot_ly(comb_data_sel_12) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP")
# plot the EJ per PKcal coefficient as a function of nonstaples fraction for these data
plot_ly(comb_data_sel_12) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
# plot the GDP per capita as a histogram
plot_ly(comb_data_sel_12) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
type = "histogram",
xbins = list(size = 1)) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
title = "Per capita GDP, selected data")
plot_ly(comb_data_all) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
type = "histogram",
xbins = list(size = 1)) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
title = "Per capita GDP, all data")
# just for 2015
plot_ly(comb_data_sel_12 %>% filter(year == 2015)) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
type = "histogram",
xbins = list(size = 1)) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
title = "Per capita GDP, selected data, 2015")
plot_ly(comb_data_all %>% filter(year == 2015)) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
type = "histogram",
xbins = list(size = 1)) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
title = "Per capita GDP, all data, 2015")
Try some linear models.
summary(lm(energy ~ 0 + PKcal, comb_data_sel_12))
##
## Call:
## lm(formula = energy ~ 0 + PKcal, data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.74904 -0.00085 0.00482 0.02039 0.80317
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal 1.0337 0.0154 67.11 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1257 on 1514 degrees of freedom
## Multiple R-squared: 0.7484, Adjusted R-squared: 0.7482
## F-statistic: 4504 on 1 and 1514 DF, p-value: < 2.2e-16
summary(lm(energy ~ 0 + PKcal + Feed_Kt, comb_data_sel_12))
##
## Call:
## lm(formula = energy ~ 0 + PKcal + Feed_Kt, data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.77217 -0.00768 -0.00053 0.00739 0.66009
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## PKcal -3.099e-02 3.008e-02 -1.03 0.303
## Feed_Kt 5.358e-06 1.408e-07 38.04 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.08991 on 1513 degrees of freedom
## Multiple R-squared: 0.8714, Adjusted R-squared: 0.8712
## F-statistic: 5127 on 2 and 1513 DF, p-value: < 2.2e-16
summary(lm(energy ~ 0 + staples + nonstaples_other + nonstaples_animal, comb_data_sel_12))
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_other + nonstaples_animal,
## data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.62582 -0.01266 -0.00028 0.00896 0.45554
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -0.39371 0.02902 -13.566 < 2e-16 ***
## nonstaples_other 6.54156 0.19146 34.166 < 2e-16 ***
## nonstaples_animal -0.77333 0.22452 -3.444 0.000588 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06967 on 1512 degrees of freedom
## Multiple R-squared: 0.9228, Adjusted R-squared: 0.9227
## F-statistic: 6029 on 3 and 1512 DF, p-value: < 2.2e-16
summary(lm(energy ~ 0 + staples + nonstaples_other + nonstaples_animal + Feed_Kt, comb_data_sel_12))
##
## Call:
## lm(formula = energy ~ 0 + staples + nonstaples_other + nonstaples_animal +
## Feed_Kt, data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.67497 -0.01032 -0.00050 0.00780 0.46169
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## staples -3.839e-01 2.882e-02 -13.322 < 2e-16 ***
## nonstaples_other 6.040e+00 2.116e-01 28.541 < 2e-16 ***
## nonstaples_animal -1.302e+00 2.434e-01 -5.349 1.02e-07 ***
## Feed_Kt 1.042e-06 1.946e-07 5.356 9.84e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06904 on 1511 degrees of freedom
## Multiple R-squared: 0.9243, Adjusted R-squared: 0.9241
## F-statistic: 4611 on 4 and 1511 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO, comb_data_sel_12))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO, data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.2408 -0.0363 0.4925 1.2720 9.6591
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## GDP_pcap_thous2015USD_FAO 0.055430 0.001441 38.47 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.592 on 1459 degrees of freedom
## (55 observations deleted due to missingness)
## Multiple R-squared: 0.5035, Adjusted R-squared: 0.5032
## F-statistic: 1480 on 1 and 1459 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + nonstaples_frac, comb_data_sel_12))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac, data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.0203 -0.8187 -0.3727 0.3182 9.5484
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 3.04833 0.05378 56.68 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.271 on 1514 degrees of freedom
## Multiple R-squared: 0.6797, Adjusted R-squared: 0.6795
## F-statistic: 3213 on 1 and 1514 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + exp(nonstaples_frac), comb_data_sel_12))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + exp(nonstaples_frac), data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.8323 -0.8270 -0.4005 0.3753 9.7712
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## exp(nonstaples_frac) 0.98933 0.01839 53.79 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.316 on 1514 degrees of freedom
## Multiple R-squared: 0.6565, Adjusted R-squared: 0.6563
## F-statistic: 2893 on 1 and 1514 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO + nonstaples_frac, comb_data_sel_12))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO + nonstaples_frac,
## data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.2840 -0.7597 -0.3054 0.3210 9.3724
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## GDP_pcap_thous2015USD_FAO 0.011164 0.001888 5.914 4.16e-09 ***
## nonstaples_frac 2.653657 0.090133 29.441 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.261 on 1458 degrees of freedom
## (55 observations deleted due to missingness)
## Multiple R-squared: 0.6886, Adjusted R-squared: 0.6882
## F-statistic: 1612 on 2 and 1458 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac, comb_data_sel_12))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac, data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1238 -0.7595 -0.2984 0.2931 9.4103
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.2915 0.0411 7.092 2.05e-12 ***
## nonstaples_frac 1.8215 0.1853 9.829 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.255 on 1458 degrees of freedom
## (55 observations deleted due to missingness)
## Multiple R-squared: 0.6918, Adjusted R-squared: 0.6914
## F-statistic: 1636 on 2 and 1458 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac, comb_data_sel_12, weights = comb_data_sel_12$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac, data = comb_data_sel_12, weights = comb_data_sel_12$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.93643 -0.08688 -0.02880 0.04626 1.18749
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.04481 0.02824 1.587 0.113
## nonstaples_frac 2.67969 0.12888 20.792 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1911 on 1458 degrees of freedom
## (55 observations deleted due to missingness)
## Multiple R-squared: 0.8185, Adjusted R-squared: 0.8182
## F-statistic: 3287 on 2 and 1458 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac + I(nonstaples_frac^2), data = comb_data_sel_12)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3382 -0.6916 -0.2372 0.3660 9.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.1053 0.0483 2.180 0.0294 *
## nonstaples_frac -0.1616 0.3353 -0.482 0.6299
## I(nonstaples_frac^2) 4.3423 0.6161 7.048 2.8e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.235 on 1457 degrees of freedom
## (55 observations deleted due to missingness)
## Multiple R-squared: 0.7019, Adjusted R-squared: 0.7013
## F-statistic: 1144 on 3 and 1457 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12, weights = comb_data_sel_12$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac + I(nonstaples_frac^2), data = comb_data_sel_12,
## weights = comb_data_sel_12$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.00031 -0.09232 -0.03058 0.04637 1.11985
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) -0.08900 0.03619 -2.459 0.014 *
## nonstaples_frac 2.11495 0.16024 13.198 < 2e-16 ***
## I(nonstaples_frac^2) 1.92223 0.33058 5.815 7.45e-09 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.189 on 1457 degrees of freedom
## (55 observations deleted due to missingness)
## Multiple R-squared: 0.8226, Adjusted R-squared: 0.8222
## F-statistic: 2252 on 3 and 1457 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12, weights = comb_data_sel_12$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac^2),
## data = comb_data_sel_12, weights = comb_data_sel_12$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.99352 -0.09006 -0.02915 0.04514 1.15925
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 2.0408 0.1552 13.148 < 2e-16 ***
## I(nonstaples_frac^2) 1.3696 0.2523 5.429 6.59e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1872 on 1513 degrees of freedom
## Multiple R-squared: 0.8206, Adjusted R-squared: 0.8203
## F-statistic: 3459 on 2 and 1513 DF, p-value: < 2.2e-16
Plotting the coefficients weighted by the consumption of calories in each region and year.
comb_data_sel_12_to_plot <- comb_data_sel_12 %>%
mutate(size_to_plot = case_when(PKcal < 0.05 ~ 0.05,
PKcal > 0.75 ~ 0.75,
TRUE ~ PKcal))
lm_to_plot_ns_frac_sq <- lm(EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12, weights = comb_data_sel_12$PKcal)
lm_to_plot_ns_frac_sq_summary <- summary(lm_to_plot_ns_frac_sq)
print(lm_to_plot_ns_frac_sq_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac^2),
## data = comb_data_sel_12, weights = comb_data_sel_12$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.99352 -0.09006 -0.02915 0.04514 1.15925
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 2.0408 0.1552 13.148 < 2e-16 ***
## I(nonstaples_frac^2) 1.3696 0.2523 5.429 6.59e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1872 on 1513 degrees of freedom
## Multiple R-squared: 0.8206, Adjusted R-squared: 0.8203
## F-statistic: 3459 on 2 and 1513 DF, p-value: < 2.2e-16
pval <- lm_to_plot_ns_frac_sq_summary$coef[1,4]
Rsq <- lm_to_plot_ns_frac_sq_summary$adj.r.squared
x_for_lin_reg_plot <- c(min(comb_data_sel_12$nonstaples_frac), max(comb_data_sel_12$nonstaples_frac))
plot_ly(comb_data_sel_12_to_plot) %>%
add_trace(y = ~EJ_per_PKcal,
x = ~nonstaples_frac,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0(year, "; PKcal = ", PKcal),
size = ~size_to_plot,
sizes = c(5, 150)) %>%
#marker = ~list(size = size_to_plot*50)) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot_ns_frac_sq, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ / PKcal"),
title = "Food processing energy use coefficient vs nonstaples fraction")
lm_to_plot_ns_frac_sq <- lm(EJ_per_PKcal ~ 0 + nonstaples_frac, comb_data_sel_12, weights = comb_data_sel_12$PKcal)
lm_to_plot_ns_frac_sq_summary <- summary(lm_to_plot_ns_frac_sq)
print(lm_to_plot_ns_frac_sq_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac, data = comb_data_sel_12,
## weights = comb_data_sel_12$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.91312 -0.09016 -0.03169 0.04619 1.17828
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 2.86236 0.03481 82.23 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.189 on 1514 degrees of freedom
## Multiple R-squared: 0.8171, Adjusted R-squared: 0.8169
## F-statistic: 6762 on 1 and 1514 DF, p-value: < 2.2e-16
pval <- lm_to_plot_ns_frac_sq_summary$coef[1,4]
Rsq <- lm_to_plot_ns_frac_sq_summary$adj.r.squared
x_for_lin_reg_plot <- c(min(comb_data_sel_12$nonstaples_frac), max(comb_data_sel_12$nonstaples_frac))
plot_ly(comb_data_sel_12_to_plot) %>%
add_trace(y = ~EJ_per_PKcal,
x = ~nonstaples_frac,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~paste0(year, "; PKcal = ", PKcal),
size = ~size_to_plot,
sizes = c(5, 150)) %>%
#marker = ~list(size = size_to_plot*50)) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot_ns_frac_sq, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ / PKcal"),
title = "Food processing energy use coefficient vs nonstaples fraction")
ggplot(comb_data_sel_12_to_plot,
aes(x = nonstaples_frac, y = EJ_per_PKcal, color = country_name, size = PKcal)) +
geom_point() +
guides(color = "none", size = "none") +
geom_smooth(aes(group = 1), method = "lm", formula = y ~ 0 + x + I(x ^ 2), se = FALSE) +
labs(x = "Nonstaples fraction", y = "EJ / PKcal", title = "Energy coefficient for food processing vs fraction of calories consumed from nonstaples") +
theme(axis.text.x = element_text(size=10)) +
theme_classic()
ggsave(paste0(fig_dir, "/coef_ns_relationship_sel_12.png"), width = 10, height = 10)
ggplot(comb_data_sel_12_to_plot,
aes(x = nonstaples_frac, y = EJ_per_PKcal, color = country_name, size = PKcal)) +
geom_point() +
guides(color = "none", size = "none") +
geom_smooth(aes(group = 1, weight = PKcal), method = "lm", formula = y ~ 0 + x + I(x ^ 2), se = FALSE) +
labs(x = "Nonstaples fraction", y = "EJ / PKcal", title = "Energy coefficient for food processing vs fraction of calories consumed from nonstaples") +
theme(axis.text.x = element_text(size=10)) +
theme_classic()
ggsave(paste0(fig_dir, "/coef_ns_relationship_sel_12_weighted.png"), width = 10, height = 10)
ggplot(comb_data_sel_12_to_plot,
aes(x = nonstaples_frac, y = EJ_per_PKcal, color = country_name, size = PKcal)) +
geom_point() +
guides(color = "none", size = "none") +
geom_smooth(aes(group = 1, weight = PKcal), method = "lm", formula = y ~ 0 + x , se = FALSE) +
labs(x = "Nonstaples fraction", y = "EJ / PKcal", title = "Energy coefficient for food processing vs fraction of calories consumed from nonstaples") +
theme(axis.text.x = element_text(size=10)) +
theme_classic()
ggsave(paste0(fig_dir, "/coef_ns_relationship_sel_12_weighted_linear.png"), width = 10, height = 10)
GDP per capita categories: 0-2, 2-5, 5-10, 10-20, 20-40, 40-60, 60+
comb_data_sel_12_GDP_cats <- comb_data_sel_12 %>%
mutate(GDP_pcap_group = case_when(GDP_pcap_thous2015USD_FAO < 2 ~ "< 2",
GDP_pcap_thous2015USD_FAO < 5 ~ "2-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 40 ~ "20-40",
GDP_pcap_thous2015USD_FAO < 60 ~ "40-60",
TRUE ~ ">= 60"),
GDP_pcap_group = factor(GDP_pcap_group, levels = c("< 2", "2-5", "5-10", "10-20", "20-40", "40-60", ">= 60")))
plot_ly(comb_data_sel_12_GDP_cats) %>%
add_trace(x = ~GDP_pcap_group,
y = ~EJ_per_PKcal,
type = "box") %>%
layout(xaxis = list(title = "GDP category"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
# calculate the 10th percentile for each of the GDP groups
comb_data_sel_12_GDP_cats_percs <- comb_data_sel_12_GDP_cats %>%
group_by(GDP_pcap_group) %>%
summarize(min_EJ_per_PKcal = min(EJ_per_PKcal, na.rm = TRUE),
perc_5_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.05),
perc_10_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.1),
perc_25_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.25),
perc_50_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.5),
num = n())
# min_EJ_pcap = min(EJ_pcap, na.rm = TRUE),
# perc_5_EJ_pcap = quantile(EJ_pcap, 0.05, na.rm = TRUE),
# perc_10_EJ_pcap = quantile(EJ_pcap, 0.1, na.rm = TRUE),
# perc_25_EJ_pcap = quantile(EJ_pcap, 0.25, na.rm = TRUE),
# perc_50_EJ_pcap = quantile(EJ_pcap, 0.5, na.rm = TRUE))
# expand for the GDP values for plotting
comb_data_sel_12_GDP_cats_to_plot <- data.frame(GDP_pcap_thous2015USD_FAO = seq(0,
max(comb_data_sel_12$GDP_pcap_thous2015USD_FAO, na.rm = TRUE),
by = 0.05)) %>%
mutate(GDP_pcap_group = case_when(GDP_pcap_thous2015USD_FAO < 2 ~ "< 2",
GDP_pcap_thous2015USD_FAO < 5 ~ "2-5",
GDP_pcap_thous2015USD_FAO < 10 ~ "5-10",
GDP_pcap_thous2015USD_FAO < 20 ~ "10-20",
GDP_pcap_thous2015USD_FAO < 40 ~ "20-40",
GDP_pcap_thous2015USD_FAO < 60 ~ "40-60",
TRUE ~ ">= 60")) %>%
left_join(comb_data_sel_12_GDP_cats_percs)
# plot the percentile that will be used for each GDP category
plot_ly(comb_data_sel_12_GDP_cats) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = comb_data_sel_12_GDP_cats_to_plot$GDP_pcap_thous2015USD_FAO,
y = comb_data_sel_12_GDP_cats_to_plot$perc_10_EJ_per_PKcal,
name = paste0(comb_data_sel_12_GDP_cats_to_plot$GDP_pcap_group, " GDP per cap, 10%tile"),
color = I("black"),
type = "scatter",
mode = "lines",
line = list(dash = "dash")) %>%
add_trace(x = comb_data_sel_12_GDP_cats_to_plot$GDP_pcap_thous2015USD_FAO,
y = comb_data_sel_12_GDP_cats_to_plot$perc_50_EJ_per_PKcal,
name = paste0(comb_data_sel_12_GDP_cats_to_plot$GDP_pcap_group, " GDP per cap, 50%tile"),
color = I("gray35"),
type = "scatter",
mode = "lines",
line = list(dash = "dash")) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP")
# save
write_csv(comb_data_sel_12_GDP_cats_percs, paste0(fig_dir, "/comb_data_sel_12_GDP_cats_percs.csv"))
Nonstaple fraction categories: < 0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7, 0.7+
comb_data_sel_12_ns_cats <- comb_data_sel_12 %>%
mutate(nonstaples_frac_group = case_when(nonstaples_frac < 0.3 ~ "< 0.3",
nonstaples_frac < 0.4 ~ "0.3-0.4",
nonstaples_frac < 0.5 ~ "0.4-0.5",
nonstaples_frac < 0.6 ~ "0.5-0.6",
nonstaples_frac < 0.7 ~ "0.6-0.7",
TRUE ~ ">= 0.7"),
nonstaples_frac_group = factor(nonstaples_frac_group , levels = c("< 0.3", "0.3-0.4", "0.4-0.5", "0.5-0.6", "0.6-0.7", ">= 0.7")))
plot_ly(comb_data_sel_12_ns_cats) %>%
add_trace(x = ~nonstaples_frac_group,
y = ~EJ_per_PKcal,
type = "box") %>%
layout(xaxis = list(title = "Nonstaple fraction category"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient")
# calculate the 10th percentile for each of the nonstaple fraction groups
comb_data_sel_12_ns_cats_percs <- comb_data_sel_12_ns_cats %>%
group_by(nonstaples_frac_group) %>%
summarize(min_EJ_per_PKcal = min(EJ_per_PKcal, na.rm = TRUE),
perc_5_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.05),
perc_10_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.1),
perc_25_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.25),
perc_50_EJ_per_PKcal = quantile(EJ_per_PKcal, 0.5),
num = n())
# expand for the nonstaple values for plotting
comb_data_sel_12_ns_cats_to_plot <- data.frame(nonstaples_frac = seq(min(comb_data_sel_12$nonstaples_frac, na.rm = TRUE),
max(comb_data_sel_12$nonstaples_frac, na.rm = TRUE),
by = 0.01)) %>%
mutate(nonstaples_frac_group = case_when(nonstaples_frac < 0.3 ~ "< 0.3",
nonstaples_frac < 0.4 ~ "0.3-0.4",
nonstaples_frac < 0.5 ~ "0.4-0.5",
nonstaples_frac < 0.6 ~ "0.5-0.6",
nonstaples_frac < 0.7 ~ "0.6-0.7",
TRUE ~ ">= 0.7"),
nonstaples_frac_group = factor(nonstaples_frac_group , levels = c("< 0.3", "0.3-0.4", "0.4-0.5", "0.5-0.6", "0.6-0.7", ">= 0.7"))) %>%
left_join(comb_data_sel_12_ns_cats_percs)
# plot the percentile that will be used for each GDP category
plot_ly(comb_data_sel_12_ns_cats) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~country_name,
text = ~year) %>%
add_trace(x = comb_data_sel_12_ns_cats_to_plot$nonstaples_frac,
y = comb_data_sel_12_ns_cats_to_plot$perc_10_EJ_per_PKcal,
name = paste0(comb_data_sel_12_ns_cats_to_plot$nonstaples_frac_group, " nonstaples frac, 10%tile"),
color = I("black"),
type = "scatter",
mode = "lines",
line = list(dash = "dash")) %>%
add_trace(x = comb_data_sel_12_ns_cats_to_plot$nonstaples_frac,
y = comb_data_sel_12_ns_cats_to_plot$perc_50_EJ_per_PKcal,
name = paste0(comb_data_sel_12_ns_cats_to_plot$nonstaples_frac_group, " nonstaples frac, 50%tile"),
color = I("gray35"),
type = "scatter",
mode = "lines",
line = list(dash = "dash")) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction of calorie consumption")
# save
write_csv(comb_data_sel_12_ns_cats_percs, paste0(fig_dir, "/comb_data_sel_12_nonstaples_cats_percs.csv"))
Note that some of the GCAM regions are incomplete - the data for each region here will only be coming from countries within that region that have good data for that year.
comb_data_sel_12_GCAM_reg <- comb_data_sel_12 %>%
group_by(GCAM_region_ID, year) %>%
summarize(energy = sum(energy),
PKcal = sum(PKcal),
Food_Kt = sum(Food_Kt),
Food_Kt_w_calorie = sum(Food_Kt_w_calorie),
GDP_total_thous2015USD_FAO = sum(GDP_pcap_thous2015USD_FAO * pop),
pop = sum(pop),
Feed_Kt = sum(Feed_Kt),
nonstaples_animal = sum(nonstaples_animal),
nonstaples_other = sum(nonstaples_other),
staples = sum(staples)) %>%
mutate(GDP_pcap_thous2015USD_FAO = GDP_total_thous2015USD_FAO / pop,
staples_frac = staples / PKcal,
nonstaples_frac = (nonstaples_animal + nonstaples_other) / PKcal,
EJ_per_PKcal = energy / PKcal) %>%
ungroup() %>%
left_join(GCAM_region_names)
summary(lm(EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO + nonstaples_frac, comb_data_sel_12_GCAM_reg))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO + nonstaples_frac,
## data = comb_data_sel_12_GCAM_reg)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5070 -0.6956 -0.2122 0.4871 3.6116
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## GDP_pcap_thous2015USD_FAO 0.005141 0.002440 2.107 0.0356 *
## nonstaples_frac 2.723698 0.113427 24.013 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.913 on 508 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.7624, Adjusted R-squared: 0.7615
## F-statistic: 815 on 2 and 508 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac, comb_data_sel_12_GCAM_reg))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac, data = comb_data_sel_12_GCAM_reg)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5047 -0.7061 -0.2029 0.4729 3.6904
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.05356 0.04998 1.072 0.284
## nonstaples_frac 2.67930 0.22546 11.884 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9159 on 508 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.7609, Adjusted R-squared: 0.7599
## F-statistic: 808.1 on 2 and 508 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac, comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac, data = comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.94223 -0.16382 -0.05036 0.10702 1.16768
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.01531 0.04277 0.358 0.721
## nonstaples_frac 2.84386 0.19510 14.576 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2779 on 508 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.849, Adjusted R-squared: 0.8484
## F-statistic: 1428 on 2 and 508 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12_GCAM_reg))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac + I(nonstaples_frac^2), data = comb_data_sel_12_GCAM_reg)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7542 -0.5944 -0.1075 0.5600 3.4666
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) -0.13693 0.05546 -2.469 0.0139 *
## nonstaples_frac 0.51844 0.38388 1.351 0.1774
## I(nonstaples_frac^2) 4.96624 0.72931 6.809 2.78e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8776 on 507 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.7809, Adjusted R-squared: 0.7796
## F-statistic: 602.3 on 3 and 507 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac + I(nonstaples_frac^2), data = comb_data_sel_12_GCAM_reg,
## weights = comb_data_sel_12_GCAM_reg$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.05149 -0.16795 -0.04028 0.12218 1.05070
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) -0.19741 0.05754 -3.431 0.00065 ***
## nonstaples_frac 2.09335 0.23603 8.869 < 2e-16 ***
## I(nonstaples_frac^2) 2.87401 0.53635 5.358 1.28e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2706 on 507 degrees of freedom
## (45 observations deleted due to missingness)
## Multiple R-squared: 0.8571, Adjusted R-squared: 0.8563
## F-statistic: 1014 on 3 and 507 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac^2),
## data = comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.98380 -0.15421 -0.05104 0.10242 1.16245
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 2.1136 0.2257 9.366 < 2e-16 ***
## I(nonstaples_frac^2) 1.2408 0.3686 3.366 0.000814 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2675 on 553 degrees of freedom
## Multiple R-squared: 0.8588, Adjusted R-squared: 0.8582
## F-statistic: 1681 on 2 and 553 DF, p-value: < 2.2e-16
comb_data_sel_12_GCAM_reg_to_plot <- comb_data_sel_12_GCAM_reg %>%
mutate(size_to_plot = case_when(PKcal < 0.05 ~ 0.05,
PKcal > 0.75 ~ 0.75,
TRUE ~ PKcal))
lm_to_plot_ns_frac_sq <- lm(EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal)
lm_to_plot_ns_frac_sq_summary <- summary(lm_to_plot_ns_frac_sq)
print(lm_to_plot_ns_frac_sq_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac^2),
## data = comb_data_sel_12_GCAM_reg, weights = comb_data_sel_12_GCAM_reg$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.98380 -0.15421 -0.05104 0.10242 1.16245
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 2.1136 0.2257 9.366 < 2e-16 ***
## I(nonstaples_frac^2) 1.2408 0.3686 3.366 0.000814 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2675 on 553 degrees of freedom
## Multiple R-squared: 0.8588, Adjusted R-squared: 0.8582
## F-statistic: 1681 on 2 and 553 DF, p-value: < 2.2e-16
pval <- lm_to_plot_ns_frac_sq_summary$coef[1,4]
Rsq <- lm_to_plot_ns_frac_sq_summary$adj.r.squared
x_for_lin_reg_plot <- c(min(comb_data_sel_12_GCAM_reg$nonstaples_frac), max(comb_data_sel_12_GCAM_reg$nonstaples_frac))
plot_ly(comb_data_sel_12_GCAM_reg_to_plot) %>%
add_trace(y = ~EJ_per_PKcal,
x = ~nonstaples_frac,
type = "scatter",
mode = "markers",
color = ~region,
text = ~paste0(year, "; PKcal = ", PKcal),
size = ~size_to_plot,
sizes = c(5, 150)) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot_ns_frac_sq, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ / PKcal"),
title = "Food processing energy use coefficient vs nonstaples fraction, GCAM regions (note aggregation is incomplete)")
# plot_ly(comb_data_sel_12_GCAM_reg_to_plot) %>%
# add_trace(y = ~EJ_per_PKcal,
# x = ~nonstaples_frac,
# type = "scatter",
# mode = "markers",
# color = ~region,
# text = ~year,
# marker = ~list(size = size_to_plot*50)) %>%
# add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
# y = predict(lm_to_plot_ns_frac_sq, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
# type = "scatter",
# mode = "lines",
# name = "Linear regression",
# text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
# layout(xaxis = list(title = "Nonstaples fraction"),
# yaxis = list(title = "EJ / PKcal"),
# title = "Food processing energy use coefficient vs nonstaples fraction")
Selecting regions using the same criteria for inclusion for regions - fraction in food processing is greater than 1% and fraction in non-specified is less than 50% and year is beyond 1990.
IEA_ind_sectors_GCAM_region_total_en_frac_wider <- IEA_ind_sectors_GCAM_region_total_en %>%
dplyr::select(-value) %>%
pivot_wider(names_from = FLOW, values_from = frac) %>%
left_join(GCAM_region_names)
# get regions and years to include - only where fraction in food processing is greater than 1% and fraction in non-specified is less than 50% and year is beyond 1990
GCAM_reg_years_incl <- IEA_ind_sectors_GCAM_region_total_en_frac_wider %>%
filter(year >= 1990 & INONSPEC < 0.5 & (!is.na(FOODPRO) & FOODPRO > 0.01)) %>%
dplyr::select(GCAM_region_ID, year) %>%
left_join(GCAM_region_names)
ggplot(IEA_ind_sectors_GCAM_region_fuel %>% filter(FLOW == "FOODPRO") %>% right_join(GCAM_reg_years_incl),
aes(x = year, y = value, fill = fuel)) +
geom_col() +
facet_wrap(~region, scale = "free_y") +
scale_fill_manual(values = pal_sel, drop = TRUE, limits = force) +
labs(x = "", y = "EJ", title = "Food processing energy use (IEA)") +
theme(axis.text.x = element_text(size=5)) +
scale_x_continuous(breaks = c(1990, 2000, 2010)) +
theme_classic()
ggsave(paste0(fig_dir, "/foodpro_energy_use_by_GCAM_region_fuel_hist_IEA_sel_1.png"), width = 35, height = 20)
# filter the food and energy data
comb_data_sel_cats_GCAM_reg <- comb_data_sel_cats %>%
group_by(GCAM_region_ID, year) %>%
summarize(energy = sum(energy),
PKcal = sum(PKcal),
Food_Kt = sum(Food_Kt),
Food_Kt_w_calorie = sum(Food_Kt_w_calorie),
GDP_total_thous2015USD_FAO = sum(GDP_pcap_thous2015USD_FAO * pop),
pop = sum(pop),
Feed_Kt = sum(Feed_Kt),
nonstaples_animal = sum(nonstaples_animal),
nonstaples_other = sum(nonstaples_other),
staples = sum(staples)) %>%
mutate(GDP_pcap_thous2015USD_FAO = GDP_total_thous2015USD_FAO / pop,
staples_frac = staples / PKcal,
nonstaples_frac = (nonstaples_animal + nonstaples_other) / PKcal,
EJ_per_PKcal = energy / PKcal) %>%
ungroup() %>%
left_join(GCAM_region_names)
comb_data_sel_1_GCAM_regions <- comb_data_sel_cats_GCAM_reg %>%
right_join(GCAM_reg_years_incl) %>%
filter(!is.na(PKcal),
PKcal > 0)
# plot the EJ per PKcal coefficient as a function of GDP per capita for these data
plot_ly(comb_data_sel_1_GCAM_regions) %>%
add_trace(x = ~GDP_pcap_thous2015USD_FAO,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~region,
text = ~year) %>%
layout(xaxis = list(title = "GDP per capita (thousand $2015)"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs per capita GDP")
# plot the EJ per PKcal coefficient as a function of nonstaples fraction for these data
plot_ly(comb_data_sel_1_GCAM_regions) %>%
add_trace(x = ~nonstaples_frac,
y = ~EJ_per_PKcal,
type = "scatter",
mode = "markers",
color = ~region,
text = ~year) %>%
layout(xaxis = list(title = "Fraction of calories from nonstaples"),
yaxis = list(title = "EJ per PKcal"),
title = "Food processing input output coefficient vs nonstaples fraction")
summary(lm(EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO + nonstaples_frac, comb_data_sel_1_GCAM_regions))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + GDP_pcap_thous2015USD_FAO + nonstaples_frac,
## data = comb_data_sel_1_GCAM_regions)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5429 -0.5753 -0.2067 0.1958 3.5372
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## GDP_pcap_thous2015USD_FAO 0.006604 0.002757 2.396 0.0171 *
## nonstaples_frac 2.725668 0.141248 19.297 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9305 on 360 degrees of freedom
## (56 observations deleted due to missingness)
## Multiple R-squared: 0.7851, Adjusted R-squared: 0.7839
## F-statistic: 657.5 on 2 and 360 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac, comb_data_sel_1_GCAM_regions))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac, data = comb_data_sel_1_GCAM_regions)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.5008 -0.5777 -0.2267 0.1948 3.6195
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.08121 0.06622 1.226 0.221
## nonstaples_frac 2.62683 0.31520 8.334 1.67e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.936 on 360 degrees of freedom
## (56 observations deleted due to missingness)
## Multiple R-squared: 0.7826, Adjusted R-squared: 0.7814
## F-statistic: 647.8 on 2 and 360 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac, comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac, data = comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.9421 -0.1695 -0.0614 0.1193 1.1737
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) 0.02616 0.05194 0.504 0.615
## nonstaples_frac 2.78763 0.24010 11.610 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3127 on 360 degrees of freedom
## (56 observations deleted due to missingness)
## Multiple R-squared: 0.8566, Adjusted R-squared: 0.8558
## F-statistic: 1075 on 2 and 360 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_1_GCAM_regions))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac + I(nonstaples_frac^2), data = comb_data_sel_1_GCAM_regions)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.7518 -0.5844 -0.1069 0.3941 3.4384
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) -0.04379 0.06962 -0.629 0.530
## nonstaples_frac 0.65924 0.51841 1.272 0.204
## I(nonstaples_frac^2) 4.10110 0.87170 4.705 3.63e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9096 on 359 degrees of freedom
## (56 observations deleted due to missingness)
## Multiple R-squared: 0.7952, Adjusted R-squared: 0.7935
## F-statistic: 464.6 on 3 and 359 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + log(GDP_pcap_thous2015USD_FAO) +
## nonstaples_frac + I(nonstaples_frac^2), data = comb_data_sel_1_GCAM_regions,
## weights = comb_data_sel_1_GCAM_regions$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.05572 -0.18220 -0.03304 0.16358 1.05101
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## log(GDP_pcap_thous2015USD_FAO) -0.19899 0.06769 -2.940 0.0035 **
## nonstaples_frac 1.99378 0.28211 7.067 8.27e-12 ***
## I(nonstaples_frac^2) 3.03538 0.61060 4.971 1.03e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3029 on 359 degrees of freedom
## (56 observations deleted due to missingness)
## Multiple R-squared: 0.8658, Adjusted R-squared: 0.8647
## F-statistic: 772 on 3 and 359 DF, p-value: < 2.2e-16
summary(lm(EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal))
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac^2),
## data = comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.98775 -0.16444 -0.06195 0.10305 1.16928
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 1.8424 0.2593 7.105 5.25e-12 ***
## I(nonstaples_frac^2) 1.6278 0.4206 3.870 0.000126 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2945 on 416 degrees of freedom
## Multiple R-squared: 0.8641, Adjusted R-squared: 0.8635
## F-statistic: 1323 on 2 and 416 DF, p-value: < 2.2e-16
Plotting the coefficients weighted by the consumption of calories in each region and year.
comb_data_sel_1_GCAM_regions_to_plot <- comb_data_sel_1_GCAM_regions %>%
mutate(size_to_plot = case_when(PKcal < 0.05 ~ 0.05,
PKcal > 0.75 ~ 0.75,
TRUE ~ PKcal))
lm_to_plot_ns_frac_sq <- lm(EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac ^ 2), comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal)
lm_to_plot_ns_frac_sq_summary <- summary(lm_to_plot_ns_frac_sq)
print(lm_to_plot_ns_frac_sq_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac + I(nonstaples_frac^2),
## data = comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.98775 -0.16444 -0.06195 0.10305 1.16928
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 1.8424 0.2593 7.105 5.25e-12 ***
## I(nonstaples_frac^2) 1.6278 0.4206 3.870 0.000126 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2945 on 416 degrees of freedom
## Multiple R-squared: 0.8641, Adjusted R-squared: 0.8635
## F-statistic: 1323 on 2 and 416 DF, p-value: < 2.2e-16
pval <- lm_to_plot_ns_frac_sq_summary$coef[1,4]
Rsq <- lm_to_plot_ns_frac_sq_summary$adj.r.squared
x_for_lin_reg_plot <- c(min(comb_data_sel_1_GCAM_regions$nonstaples_frac), max(comb_data_sel_1_GCAM_regions$nonstaples_frac))
plot_ly(comb_data_sel_1_GCAM_regions_to_plot) %>%
add_trace(y = ~EJ_per_PKcal,
x = ~nonstaples_frac,
type = "scatter",
mode = "markers",
color = ~region,
text = ~paste0(year, "; PKcal = ", PKcal),
size = ~size_to_plot,
sizes = c(5, 150)) %>%
#marker = ~list(size = size_to_plot*50)) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot_ns_frac_sq, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ / PKcal"),
title = "Food processing energy use coefficient vs nonstaples fraction")
lm_to_plot_ns_frac_sq <- lm(EJ_per_PKcal ~ 0 + nonstaples_frac, comb_data_sel_1_GCAM_regions, weights = comb_data_sel_1_GCAM_regions$PKcal)
lm_to_plot_ns_frac_sq_summary <- summary(lm_to_plot_ns_frac_sq)
print(lm_to_plot_ns_frac_sq_summary)
##
## Call:
## lm(formula = EJ_per_PKcal ~ 0 + nonstaples_frac, data = comb_data_sel_1_GCAM_regions,
## weights = comb_data_sel_1_GCAM_regions$PKcal)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -0.89419 -0.16885 -0.07859 0.10589 1.19059
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## nonstaples_frac 2.82305 0.05596 50.45 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.2994 on 417 degrees of freedom
## Multiple R-squared: 0.8592, Adjusted R-squared: 0.8589
## F-statistic: 2545 on 1 and 417 DF, p-value: < 2.2e-16
pval <- lm_to_plot_ns_frac_sq_summary$coef[1,4]
Rsq <- lm_to_plot_ns_frac_sq_summary$adj.r.squared
x_for_lin_reg_plot <- c(min(comb_data_sel_1_GCAM_regions$nonstaples_frac), max(comb_data_sel_1_GCAM_regions$nonstaples_frac))
plot_ly(comb_data_sel_1_GCAM_regions_to_plot) %>%
add_trace(y = ~EJ_per_PKcal,
x = ~nonstaples_frac,
type = "scatter",
mode = "markers",
color = ~region,
text = ~paste0(year, "; PKcal = ", PKcal),
size = ~size_to_plot,
sizes = c(5, 150)) %>%
#marker = ~list(size = size_to_plot*50)) %>%
add_trace(x = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10),
y = predict(lm_to_plot_ns_frac_sq, data.frame(nonstaples_frac = seq(from = x_for_lin_reg_plot[1], to = x_for_lin_reg_plot[2], length.out = 10))),
type = "scatter",
mode = "lines",
name = "Linear regression",
text = paste0("R squared: ", round(Rsq, 3), ", P value: ", round(pval, 3))) %>%
layout(xaxis = list(title = "Nonstaples fraction"),
yaxis = list(title = "EJ / PKcal"),
title = "Food processing energy use coefficient vs nonstaples fraction")
ggplot(comb_data_sel_1_GCAM_regions_to_plot,
aes(x = nonstaples_frac, y = EJ_per_PKcal, color = region, size = PKcal)) +
geom_point() +
guides(color = "none", size = "none") +
geom_smooth(aes(group = 1), method = "lm", formula = y ~ 0 + x + I(x ^ 2), se = FALSE) +
labs(x = "Nonstaples fraction", y = "EJ / PKcal", title = "Energy coefficient for food processing vs fraction of calories consumed from nonstaples") +
theme(axis.text.x = element_text(size=10)) +
theme_classic()
ggsave(paste0(fig_dir, "/coef_ns_relationship_GCAM_reg_sel_1.png"), width = 10, height = 10)
ggplot(comb_data_sel_1_GCAM_regions_to_plot,
aes(x = nonstaples_frac, y = EJ_per_PKcal, color = region, size = PKcal)) +
geom_point() +
guides(color = "none", size = "none") +
geom_smooth(aes(group = 1, weight = PKcal), method = "lm", formula = y ~ 0 + x + I(x ^ 2), se = FALSE) +
labs(x = "Nonstaples fraction", y = "EJ / PKcal", title = "Energy coefficient for food processing vs fraction of calories consumed from nonstaples") +
theme(axis.text.x = element_text(size=10)) +
theme_classic()
ggsave(paste0(fig_dir, "/coef_ns_relationship_GCAM_reg_sel_1_weighted.png"), width = 10, height = 10)
ggplot(comb_data_sel_1_GCAM_regions_to_plot,
aes(x = nonstaples_frac, y = EJ_per_PKcal, color = region, size = PKcal)) +
geom_point() +
guides(color = "none", size = "none") +
geom_smooth(aes(group = 1, weight = PKcal), method = "lm", formula = y ~ 0 + x , se = FALSE) +
labs(x = "Nonstaples fraction", y = "EJ / PKcal", title = "Energy coefficient for food processing vs fraction of calories consumed from nonstaples") +
theme(axis.text.x = element_text(size=10)) +
theme_classic()
ggsave(paste0(fig_dir, "/coef_ns_relationship_GCAM_reg_sel_1_weighted_linear.png"), width = 10, height = 10)